home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / plain / contrib / lextex / lextex.tex < prev    next >
Encoding:
Text File  |  1992-08-25  |  118.4 KB  |  4,274 lines

  1. %$Log:    TeX $
  2. %Revision 1.1  91/10/30  15:08:24  RC-HH
  3. %Initial revision
  4. % Amendments made 08/11/91
  5. % \colsref amended (/ deleted)
  6. % \getaddress amended (/ added)
  7. % \bsdft altered by adding conditionals (ifx sols, sref, cref)
  8. % \nsnbp changed to \nsnbps (\space added) and \nsn added
  9. % The names of these should, perhaps be changed to include @
  10. % Alterations to \xref and \newxref to ensure correct updating
  11. % Alteration to \arrangement
  12. % \global added in \party in one place. May need adding in others
  13. % Alterations to \chittitle (for use in \faxsheet)
  14. % Minor alteration to \advising
  15. % Alteration to \familydivision and to \family and assoc macros
  16. % \pleadingtrue added to \ch etc, \pleading false as default
  17. % Alteration to affidavit to correct error
  18. % \clientpltrue added in \specialwrit
  19. % \sjsummons altered: do same to others
  20. % \origprocess : \par added after #2
  21. % \widowpenalty added to \pageparameters and \draftparameters
  22. % \string added in \write statement in \schedule
  23. % Alterations to \schedref and \appendref to deal with singles
  24. % Added \pararef = to \clref
  25. % Minor alterations to correct pagenumbering---check
  26. % Duplicate definition of \faxsheet removed
  27. % \everyjob added
  28. % Minor alterations re \workdone
  29. % Minor alteration to \plainoutput. \count1 & 2 swapped
  30. % 12 Nov 91 Alteration made to \maxpartywidth 
  31. % and to \resetpleadingdefaults
  32. % Many %% removed
  33. % 20 Nov 1991
  34. % Minor alterations to \today and \everyjob
  35. % \makeatletter \makeatother added
  36. % time macros (taken from gentle.tex) added
  37. % 21 Nov 1991
  38. % TUBboat.sty macros added to remove spaces
  39. % \oldquotes and ancilliary macros added
  40. % \futureday etc and \dayofweek added
  41.  
  42.  
  43. % This is LeXTeX, by Roger C-H. Horne.
  44. % Some of it is original, and some is not.
  45. % e.g., it takes chunks from manmac.tex relating to font sizing
  46. % and amends those to include poundsigns
  47. % It also takes footnotes from AMSptt.sty
  48. % And uses a number of macros that have appeared in TUGboat
  49. %
  50. % The present version is an amalgamation of two files---and it shows.
  51. %
  52. % Last modified 21th November 1991
  53.  
  54. % Introduction (ie general purpose stuff) 
  55. \newif\ifdebugging
  56. \def\dbhelp#1{\ifdebugging\inform{#1}\fi} 
  57. \debuggingfalse
  58.  
  59. \ifx\lextexisloaded\relax\message{ - already loaded}
  60.   \afterassignment\endinput
  61.   \else\let\lextexisloaded=\relax
  62.   \fi
  63.  
  64. \def\fmtname{LeXTeX}\def\fmtversion{1.005}
  65. \message{Version \fmtversion}
  66.  
  67. \catcode`@=11 % Turn the `at' sign into a letter.
  68. \catcode`\^=7 % Ensure that ^ is superscript.
  69. %\catcode`\|=12% Ensure that | is `other'.
  70.  
  71. % time macros
  72. \newcount\hour \newcount\minute
  73. \def\mm@{\ifnum \minute<10 0\fi\number\minute}
  74. \def\writetime{\hh@\mm@\space\am@pm}
  75.  
  76. \everyjob{%
  77.   \hour=\time  \divide \hour by 60
  78.   \minute=\time
  79.   \loop  \ifnum \minute > 59 \advance \minute by -60 \repeat
  80.   \ifnum \hour<13 
  81.     \def\hh@{\number\hour:}%  % supresses leading 0's
  82.     \def\am@pm{\ifnum \hour < 12 a.m.\else p.m.\fi}
  83.   \else \advance \hour by -12 
  84.     \def\hh@{\number\hour:}%  % supresses leading 0's                    \fi
  85.     \def\am@pm{\ifnum \hour > 11 a.m.\else p.m.\fi}
  86.   \fi
  87.   \inform{}%
  88.   \inform{This is LeXTeX, Version \fmtversion, running at \writetime}%
  89.   \inform{\space\space on the \today.}%
  90.   \inform{}%
  91.   \inform{Comments and bug reports to}%
  92.   \inform{}%
  93.   \inform{\space\space Roger Horne}%
  94.   \inform{\space\space 7 New Square}%
  95.   \inform{\space\space Lincoln's Inn}%
  96.   \inform{\space\space London WC2A 3QS}%
  97.   \inform{\space\space rhorne@cix.compulink.co.uk}%
  98.   \inform{}%
  99.   }
  100.  
  101. % LeX TeX logo---looking distinctly similar to \LaTeX...
  102. %
  103. \def\LeXTeX{L\kern-.25em\raise.5ex\hbox{ex}T\kern-.1667em\lower
  104.    .5ex\hbox{E}\kern-.125emX}
  105. % The LaTeX logo sometimes looks like this (it varies a little)
  106. \def\LaTeX{{\rm L\kern-.36em\raise.3ex\hbox{\scaps a}\kern-.15em
  107.     T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
  108.  
  109.  
  110. % Part 1 - Fonts etc---
  111.  
  112. % Main maths + roman---
  113.  
  114. \font\tentex=cmtex10
  115. \font\twelverm=cmr12
  116. \font\ninerm=cmr9
  117. \font\eightrm=cmr8
  118. \font\sixrm=cmr6
  119. \font\fiverm=cmr5
  120.  
  121. % Maths italic---
  122.  
  123. \font\twelvei=cmmi12
  124. \font\ninei=cmmi9
  125. \font\eighti=cmmi8 % This is used as a scriptfont
  126. \font\sixi=cmmi6 % reinstated for the time being
  127. \skewchar\twelvei='177
  128. \skewchar\ninei='177 \skewchar\eighti='177
  129. \skewchar\sixi='177
  130.  
  131. % Math symbols---
  132.  
  133. \font\twelvesy=cmsy10 scaled \magstep1
  134. \font\ninesy=cmsy9
  135. \font\eightsy=cmsy8 % used as a scriptfont
  136. \font\sixsy=cmsy6 % reinstated
  137. \skewchar\twelvesy='60
  138. \skewchar\ninesy='60
  139. \skewchar\eightsy='60
  140. \skewchar\sixsy='60
  141.  
  142. % Bold extended---
  143.  
  144. \font\twelvebf=cmbx12
  145. \font\ninebf=cmbx9
  146.  
  147. % Typewriter style---
  148.  
  149. \font\twelvett=cmtt12 % Now not using proportional version
  150. %\font\twelvett=cmvtt10 scaled \magstep1
  151. %\font\tentt=cmvtt10
  152. \font\tentt=cmtt10
  153. \font\ninett=cmtt9
  154.  
  155. % Slanted type---
  156.  
  157. \font\twelvesl=cmsl12
  158. \font\ninesl=cmsl9
  159.  
  160. % Italic---
  161.  
  162. \font\twelveit=cmti12
  163. \font\nineit=cmti9
  164.  
  165. % Odd fonts---
  166.  
  167. \font\headerfont=cmr12 scaled \magstep1
  168. \font\titlefont=cmr12 scaled \magstephalf
  169.  
  170. % Now the poundsign fonts:
  171.  
  172. \font\tenu=cmu10 % unslanted text italic
  173. \font\twelveu=cmu10 scaled \magstep1
  174. \font\tentiit=cmitt10
  175.  
  176. % And the caps and small caps fonts:
  177.  
  178. \font\fourteencaps=cmcsc10 scaled \magstep2
  179. \font\twelvecaps=cmcsc10 scaled \magstep1
  180. \font\tencaps=cmcsc10          
  181.  
  182. % The underline and cross-out macros
  183.  
  184. \def\gobble#1{}
  185.  
  186. \def\changefont#1{%
  187.   \edef\testfontname{#1\fontname\font}%
  188.   \edef\testfont{\expandafter\string\the\font}%
  189.   \edef\testtwo{#1\expandafter\gobble\testfont}%
  190.   \edef\testthree{\csname\testtwo\endcsname}%
  191.   \expandafter\ifx\csname\testtwo\endcsname\relax
  192.   \global\expandafter\font\testthree\expandafter=\testfontname
  193.   \fi\ignorespaces
  194.   \let\temppounds=\pounds
  195.   \testthree\ignorespaces}
  196.  
  197. \gdef\ul{\changefont{u}
  198.       \def\pounds{%
  199.          \setbox1\hbox{\temppounds}%
  200.          \setbox2\hbox{p}%
  201.          \copy1\kern-\wd1
  202.          \vrule depth .6\dp2 height -.45\dp2 width\wd1
  203.          \relax}%
  204.        }
  205.  
  206. \gdef\xo{\changefont{x}
  207.        \def\pounds{%
  208.          \setbox1\hbox{\temppounds}%
  209.          \setbox2\hbox{p}%
  210.          \copy1\kern-\wd1
  211.          \vrule depth -.35ex height .45ex width\wd1
  212.          \relax}%
  213.        }
  214.  
  215. \def\xu{\changefont{xu}}
  216. \let\xul\xu
  217.  
  218. % The next ones are at present somewhat abbreviated
  219. % ie, poundsigns will not be crossed-out or underlined properly
  220.  
  221. \gdef\uul{\changefont{uu}}
  222. \gdef\xxo{\changefont{xx}}
  223. \gdef\uuul{\changefont{uuu}}
  224. \gdef\xxxo{\changefont{xxx}}
  225.  
  226. % It will also be necessary in due course to define
  227. % \def\xxu - inserted by am1, deleted by am2
  228. % \def\xxxu - inserted by am1, deleted by am3
  229. % \def\xxxuu - inserted by am2, deleted by am3
  230.  
  231. % Part 2 - Dimensions, etc.
  232.  
  233. \newdimen\footindent % fn indentation
  234. \newdimen\clindent % clause indentation
  235. \newdimen\sclindent % sub-clause indentation
  236. \newdimen\ssclindent
  237. \newdimen\sssclindent
  238. \newdimen\ssssclindent
  239. \newdimen\sssssclindent
  240. \newdimen\cnindent % "computer-numbering" indentation
  241. \newdimen\hclindent % hanging indentation
  242. \newdimen\hsclindent
  243. \newdimen\hssclindent
  244. \newdimen\hsssclindent
  245. \newdimen\hssssclindent
  246. \newdimen\hsssssclindent
  247. \newdimen\quoteindent % indentation of quotations
  248. \newdimen\quoteparindent % \parindent in quotes
  249. \newdimen\clbox % box holding \cl in \clcont
  250. %\newdimen\sclbox % not used yet
  251. %\newdimen\ssclbox
  252. %\newdimen\sssclbox
  253. %\newdimen\ssssclbox
  254. %\newdimen\sssssclbox 
  255. \newdimen\signindent % indentation of signature
  256. \newdimen\rbracketsize % size of brackets round sworn, etc
  257. \newdimen\lbracketsize
  258. \newdimen\brackdepth % Depth of space in sworn etc
  259. \newdimen\notespace % space marginal notes--text
  260. \newdimen\maxnote % width of marginal note
  261. \newdimen\clnamelength % length of "clause" in contents macros
  262. \newdimen\pagewidth % alternative name for \hsize
  263. \newdimen\pageheight % alternative name for \vsize
  264.  
  265. \newcount\footmarkcount@ % No. of footnotes
  266. \newcount\recno % recitals
  267. \newcount\clno % clauses and sub-clauses
  268. \newcount\sclno
  269. \newcount\ssclno % sub-sub etc
  270. \newcount\sssclno
  271. \newcount\ssssclno
  272. \newcount\sssssclno
  273. \newcount\greekno % see \ssscl & \sssscl
  274. \newcount\cardno % see \sssscl & \ssssscl
  275. \newcount\exno % Exhibits in affidavits
  276. \newcount\clauselevel
  277. \newcount\ssdcount \ssdcount=0 % new
  278. \newcount\schedcount \schedcount=0
  279. \newcount\partcount \partcount=0
  280.  
  281. \newskip\quoteparskip %parskip in quotes
  282. \newskip\ttglue
  283. \newskip\blankskip % Used in \noaddr etc
  284. \newskip\twelvebase % \normalbaselines (12pt type)
  285. \newskip\tenbase % \normalbaselines (10pt type)
  286. \newskip\ninebase % \normalbaselines (9pt type)
  287. \newskip\twelvesmallskipamount % TB p. 349
  288. \newskip\tensmallskipamount
  289. \newskip\ninesmallskipamount
  290. \newskip\twelvemedskipamount
  291. \newskip\tenmedskipamount
  292. \newskip\ninemedskipamount
  293. \newskip\twelvebigskipamount
  294. \newskip\tenbigskipamount
  295. \newskip\ninebigskipamount
  296. \newskip\settledgap % distance between settled & sig.
  297. \newskip\clskip % vskip for clauses
  298. \newskip\sclskip % vskip for sub-clauses
  299. \newskip\ssclskip % ditto ss-clauses
  300. \newskip\sssclskip % ditto sss-clauses
  301.  
  302. \newif\ifgreek % see \sssscl
  303. \newif\ifcard % see \ssssscl
  304. \newif\ifclind % hanging indentation in clauses
  305. \newif\ifcontents % table of contents produced
  306. \newif\ifnocommaindate % used in \today
  307. \newif\ifq % Used (?) in the quote macros
  308. \newif\ifxrfmissing % cross-refs file
  309. \newif\ifvisible % used in contents
  310. \newif\ifmarginalnotes % if true, notes in margin
  311. \newif\ifxrefs % check this
  312. \newif\ifoldxrffile % 
  313. \newif\ifindex
  314. \newif\iffullsize \fullsizefalse% Whether fullsize backsheet
  315. \newif\ifdraft \drafttrue% Draft or engrossment
  316. \newif\ifpleading % No date req'd for pleadings
  317. \newif\ifucfirstline % \ucfirstlinetrue
  318. \newif\ifchit % print a fee chit
  319. \newif\ifendorsement \endorsementfalse
  320.  
  321. \newread\xrf
  322. \newread\inx
  323.  
  324. \newwrite\cont 
  325. \newwrite\inx
  326. \newwrite\xrf
  327.  
  328.  
  329. % Part 3 - Now add the poundsign macros:
  330.  
  331. \def\rmpo{\leavevmode\lower.055ex\hbox{\$}\kern-.0em}
  332. \def\itpo{\leavevmode\lower.055ex\hbox{\$}\kern-.09em}
  333. \def\slpo{\leavevmode\lower.055ex\hbox{\$}\kern-.07em}
  334. \def\bfpo{\leavevmode\pmb{\lower.025ex\hbox{\$}\kern-.04em}}
  335. \def\ttpo{\leavevmode\lower.0ex\hbox{\$}\kern0em}
  336. \def\ttkludgepo{\leavevmode\epmb{\lower.0ex\hbox{\$}\kern-.0em}}
  337.  
  338. \def\pmb#1{\setbox0=\hbox{#1}% Poor man's bold
  339.   \kern-.025em\copy0\kern-\wd0
  340.   \kern.05em\copy0\kern-\wd0
  341.   \kern-.025em\raise.0003em\box0 }
  342.  
  343. \def\epmb#1{\setbox0=\hbox{#1}% Extremely poor man's bold
  344.   \kern-.005em\copy0\kern-\wd0
  345.   \raise.015em\copy0\kern-\wd0
  346.   \kern.01em\copy0\kern-\wd0
  347.   \kern-.005em\raise.015em\box0 }
  348.  
  349.  
  350. % Part 4 - The size-changing macros
  351.  
  352. % These are adapted from the 10-point manmac macros
  353. % Script and scriptscrip removed except in \rm
  354.  
  355. \def\twelvepoint{\def\rm{\def\pounds{{\twelveu\rmpo}}\fam0\twelverm}%
  356.   \textfont0=\twelverm \scriptfont0=\eightrm \scriptscriptfont0=\sixrm
  357.   \textfont1=\twelvei \scriptfont1=\eighti \scriptscriptfont1=\sixi
  358.   \textfont2=\twelvesy \scriptfont2=\eightsy \scriptscriptfont2=\sixsy
  359.   \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
  360.   \def\it{\def\pounds{{\itpo}}\fam\itfam\twelveit}%
  361.   \textfont\itfam=\twelveit
  362.   \def\sl{\def\pounds{{\twelveit\slpo}}\fam\slfam\twelvesl}%
  363.   \textfont\slfam=\twelvesl
  364.   \def\bf{\def\pounds{{\twelveu\bfpo}}\fam\bffam\twelvebf}% pmb poundsign
  365.   \textfont\bffam=\twelvebf
  366.   \def\tt{\def\pounds{{\tenu\ttkludgepo}}\fam\ttfam\twelvett}% ! poundsign
  367.   \textfont\ttfam=\twelvett
  368.   \tt \ttglue=.5em plus.25em minus.15em % not needed for cmvtt fonts
  369.   \normalbaselineskip=\twelvebase
  370.   \smallskipamount=\twelvesmallskipamount
  371.   \medskipamount=\twelvemedskipamount
  372.   \bigskipamount=\twelvebigskipamount
  373.   \def\caps{\def\pounds{~}\fourteencaps}% don't use the pound sign
  374.   \def\scaps{\def\pounds{{\twelveu\rmpo}}\twelvecaps}%
  375.   \setbox\strutbox=\hbox{\vrule height.7\normalbaselineskip
  376.     depth.3\normalbaselineskip width\z@}%
  377.   \normalbaselines\rm}
  378. % consider changing normalbaselineskip to \the\twelvebase
  379.  
  380. \def\tenpoint{\def\rm{\def\pounds{{\tenu\rmpo}}\fam0\tenrm}%
  381.   \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
  382.   \textfont1=\teni
  383.   \textfont2=\tensy
  384.   \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
  385.   \def\it{\def\pounds{{\itpo}}\fam\itfam\tenit}%
  386.   \textfont\itfam=\tenit
  387.   \def\sl{\def\pounds{{\tenit\slpo}}\fam\slfam\tensl}%
  388.   \textfont\slfam=\tensl
  389.   \def\bf{\def\pounds{{\tenu\bfpo}}\fam\bffam\tenbf}%
  390.   \textfont\bffam=\tenbf
  391.   \def\tt{\def\pounds{{\tentiit\ttpo}}\fam\ttfam\tentt}%
  392.   \textfont\ttfam=\tentt
  393.   \tt \ttglue=.5em plus.25em minus.15em
  394.   \smallskipamount=\tensmallskipamount
  395.   \medskipamount=\tenmedskipamount
  396.   \bigskipamount=\tenbigskipamount
  397.   \normalbaselineskip=\tenbase
  398.   \def\caps{\def\pounds{{\twelveu\rmpo}}\twelvecaps}%
  399.   \def\scaps{\def\pounds{{\tenu\rmpo}}\tencaps}%
  400.   \setbox\strutbox=\hbox{\vrule height10pt depth5pt width\z@}%
  401.   \normalbaselines\rm}
  402.  
  403. \def\ninepoint{\def\rm{\def\pounds{{\nineit\slpo}}\fam0\ninerm}%
  404.   \textfont0=\ninerm \scriptfont0=\sixrm \scriptscriptfont0=\fiverm
  405.   \textfont1=\ninei
  406.   \textfont2=\ninesy
  407.   \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
  408.   \def\it{\def\pounds{{\nineit\itpo}}\fam\itfam\nineit}%
  409.   \textfont\itfam=\nineit
  410.   \def\sl{\def\pounds{{\nineit\slpo}}\fam\slfam\ninesl}%
  411.   \textfont\slfam=\ninesl
  412.   \def\bf{\def\pounds{~}\fam\bffam\ninebf}% pound sign to be added
  413.   \textfont\bffam=\ninebf
  414.   \def\tt{\def\pounds{~}\fam\ttfam\ninett}% no pound sign
  415.   \textfont\ttfam=\ninett
  416.   \tt \ttglue=.5em plus.25em minus.15em
  417.   \smallskipamount=\ninesmallskipamount
  418.   \medskipamount=\ninemedskipamount
  419.   \bigskipamount=\ninebigskipamount
  420.   \normalbaselineskip=\ninebase
  421.   \setbox\strutbox=\hbox{\vrule height8pt depth3pt width\z@}%
  422.   \normalbaselines\rm}
  423.  
  424.  
  425. % Part 5 - Footnotes
  426.  
  427. % These are adapted from the AMSTeX macros
  428. % For details of usage see "The Joy of TeX" by Spivak M.D.
  429.  
  430. \def\relaxnext@{\let\next\relax}
  431.  
  432. % This is new. Adaption of \hang etc (Vol.B p.355)
  433.  
  434. \def\fang{\hangindent\footindent}
  435. \def\fitem{\par\fang\toeindent}
  436. \def\toeindent#1{\noindent\hbox to \footindent{\hss#1\thinspace}}
  437.  
  438. % This is where AMSPPT.STY is added:
  439.  
  440. \def\footmarkform@#1{$^{#1}$}
  441. \let\thefootnotemark\footmarkform@
  442. \def\makefootnote@#1#2{\insert\footins
  443.   {\interlinepenalty\interfootnotelinepenalty
  444. % The original (AMSTeX) uses 8-point:
  445.   \ninepoint\splittopskip\ht\strutbox\splitmaxdepth\dp\strutbox
  446.   \floatingpenalty\@MM\leftskip\z@\rightskip\z@
  447.     \spaceskip\z@\xspaceskip\z@
  448. % This differs from the original:
  449.   \fitem{#1}\footstrut\ignorespaces#2\unskip\lower\dp\strutbox
  450.   \vbox to\dp\strutbox{}}}
  451.   \footmarkcount@\z@
  452. \def\footnotemark{%
  453.  \let\@sf\empty\relaxnext@\ifhmode\edef
  454.  \@sf{\spacefactor\the\spacefactor}\/\fi
  455.  \def\next@{\ifx[\next\let\next\nextii@\else
  456.   \ifx"\next\let\next\nextiii@\else
  457.   \let\next\nextiv@\fi\fi\next}% and from here
  458.  \def\nextii@[##1]{\footmarkform@{##1}\@sf}%
  459.  \def\nextiii@"##1"{{##1}\@sf}%
  460.  \def\nextiv@{{\scriptfont0=\sevenrm % scriptfont changed to 7pt
  461.   \global\advance\footmarkcount@\@ne
  462.   \footmarkform@{\number\footmarkcount@}\@sf}}%
  463.  \futurelet\next\next@}
  464. \def\footnotetext{\relaxnext@
  465.  \def\next@{\ifx[\next\let\next\nextii@\else
  466.   \ifx"\next\let\next\nextiii@\else
  467.   \let\next\nextiv@\fi\fi\next}%
  468.  \def\nextii@[##1]##2{\makefootnote@{%
  469.   \footmarkform@{##1}}{{\frenchspacing##2}}}% {\frenchspacing} added
  470.  \def\nextiii@"##1"##2{\makefootnote@{##1}{{\frenchspacing##2}}}%
  471.  \def\nextiv@##1{\makefootnote@{%
  472.   \footmarkform@{\number\footmarkcount@}}{{\frenchspacing}##1}}%
  473.  \futurelet\next\next@}
  474. \def\footnote{\let\@sf\empty\relaxnext@\ifhmode\edef
  475.  \@sf{\spacefactor\the\spacefactor}\/\fi
  476.  \def\next@{\ifx[\next\let\next\nextii@\else
  477.   \ifx"\next\let\next\nextiii@\else
  478.   \let\next\nextiv@\fi\fi\next}%
  479.  \def\nextii@[##1]##2{%
  480.   \footnotemark[##1]\footnotetext[##1]{{\frenchspacing##2}}}%
  481.  \def\nextiii@"##1"##2{%
  482.   \footnotemark"##1"\footnotetext"##1"{{\frenchspacing##2}}}%
  483.  \def\nextiv@##1{\footnotemark\footnotetext{{\frenchspacing##1}}}%
  484.  \futurelet\next\next@}
  485. \def\adjustfootnotemark#1{\advance\footmarkcount@#1\relax}
  486.  
  487. \def\ref{\unskip\footnote}% Remove space from \se if necessary
  488.  
  489. % Prevent footnote splitting
  490.  
  491. \interfootnotelinepenalty=10000 % No splitting of footnotes
  492. \skip\footins=12pt plus 2pt minus 4pt
  493. % space added when footnote is present - taken from manmac
  494.  
  495.  
  496. % Part 6 - Macros to set all counts to zero
  497.  
  498. \def\clearnotenumber{\footmarkcount@\z@} % footnote counter 
  499. \def\clearrecno{\recno=64}         % Recital counter: 65 is `A'
  500. \def\clearclno{\clno=0}            % Clause etc counters
  501. \def\clearsclno{\sclno=0}
  502. \def\clearssclno{\ssclno=96}       % 97 is `a'
  503. \def\clearsssclno{\sssclno=0}
  504. \def\clearssssclno{\ssssclno=96}
  505. \def\clearsssssclno{\sssssclno=96}
  506. \def\cleargreekno{\greekno="010A}  % "010B is alpha "027C is heart
  507. \def\clearcardno{\cardno="027B}    % "027C is heart-suit
  508. \def\clearexno{\exno=0} % exhibits
  509. \def\clearpageno{\pageno=1 \footline={\hss\tenrm\folio\hss}}
  510.  
  511. \def\reset{%
  512.   \clearrecno
  513.   \clearclno
  514.   \clearsclno
  515.   \clearssclno
  516.   \clearsssclno
  517.   \clearssssclno
  518.   \clearsssssclno
  519.   \cleargreekno
  520.   \clearcardno
  521.   \clearexno
  522.   \clearnotenumber
  523.   \clearpageno
  524.   \clauselevel=0}
  525.  
  526.  
  527. % Part 7 - Automatic clause numbering
  528.  
  529. % The #1 in \xcl etc. is the clause number
  530. % These macros do not increase the count regs.
  531. % \ignorespaces is used to excess since these macros
  532. % can be abused somewhat - leading to odd spaces
  533. % appearing in unexpected places!
  534.  
  535. \def\xcl#1{\clearsclno% Set scl counter to zero
  536.   \dimen0=\the\parindent\parindent=0pt% store current setting
  537.   \ifclind \hangindent=\clindent \else\hangindent=\hclindent\fi
  538.   \clauselevel=1
  539.   \hangafter=1
  540.   \vskip\clskip
  541.   \edef\testit{#1}%
  542.   \ifx\testit\empty\hangafter0\noindent
  543.   \else
  544.     \leavevmode\hbox to\clindent{%
  545.       \ignorespaces#1\hfil}\ignorespaces
  546.   \fi
  547.   \parindent=\the\dimen0\relax
  548.   \ignorespaces}
  549.  
  550. \def\xscl#1{\clearssclno %
  551.   \dimen0=\the\parindent \parindent=0pt 
  552.   % Note the difference between next line and same in \xsscl
  553.   % This seems to be essential
  554.   \ifnum\prevgraf=0\kern-\clindent\else\vskip\sclskip\fi
  555.   \ifclind \hangindent=\sclindent \else\hangindent=\hsclindent\fi
  556.   \clauselevel=2
  557.   \hangafter=1
  558.   \edef\testit{#1}%
  559.   \ifx\testit\empty\hangafter0\noindent
  560.   \else\leavevmode\unskip\hbox to \sclindent{%
  561.     \hskip\clindent\ignorespaces #1\hfil}%
  562.     \ignorespaces
  563.   \fi
  564.   \parindent=\the\dimen0\relax
  565.   \unskip\ignorespaces}
  566.  
  567. \def\xsscl#1{\clearsssclno % \advance\ssclno by 1
  568.   \dimen0=\the\parindent \parindent=0pt
  569.   \ifdim\hangindent>0pt \kern-\sclindent\else\vskip\ssclskip\fi
  570.   \ifclind \hangindent=\ssclindent \else\hangindent=\hssclindent\fi
  571.   \clauselevel=3
  572.   \hangafter=1
  573.   \edef\testit{#1}%
  574.   \ifx\testit\empty\hangafter0\noindent
  575.   \else
  576.     \leavevmode\unskip\hbox to \ssclindent{%
  577.     \hskip\sclindent
  578.     \ignorespaces #1\hfil}\ignorespaces
  579.   \fi
  580.   \parindent=\the\dimen0\relax
  581.   \unskip\ignorespaces}
  582.  
  583. \def\xssscl#1{\clearssssclno \cleargreekno % \advance\sssclno by 1
  584.   \dimen0=\the\parindent \parindent=0pt
  585.   \ifdim\hangindent>0pt \kern-\ssclindent\else\vskip\sssclskip\fi
  586.   \ifclind \hangindent=\sssclindent \else\hangindent=\hsssclindent\fi
  587.   \clauselevel=4
  588.   \hangafter=1
  589.   \edef\testit{#1}%
  590.   \ifx\testit\empty\hangafter0\noindent
  591.   \else
  592.     \leavevmode\unskip\hbox to \sssclindent{%
  593.     \hskip\ssclindent
  594.     \ignorespaces #1\hfil}\ignorespaces
  595.   \fi
  596.   \parindent=\the\dimen0\relax
  597.   \aftergroup\ignorespaces}
  598.  
  599. \def\xsssscl#1{\clearsssssclno \clearcardno
  600.   \dimen0=\the\parindent \parindent=0pt
  601.   \ifdim\hangindent>0pt \kern-\sssclindent\fi
  602.   \ifclind \hangindent=\ssssclindent \else\hangindent=\hssssclindent\fi
  603.   \clauselevel=5 % This is not used as yet
  604.   \hangafter=1
  605.   \edef\testit{#1}%
  606.   \ifx\testit\empty\hangafter0\noindent
  607.   \else
  608.   \leavevmode\unskip\hbox to \ssssclindent{%
  609.     \hskip\sssclindent
  610.     \ignorespaces #1\hfil}\ignorespaces
  611.   \fi
  612.   \parindent=\the\dimen0\relax
  613.   \aftergroup\ignorespaces}
  614.  
  615. \def\xssssscl#1{% Nothing to clear!
  616.   \dimen0=\the\parindent \parindent=0pt
  617.   \ifdim\hangindent>0pt \kern-\ssssclindent\fi
  618.   \ifclind \hangindent=\sssssclindent 
  619.     \else\hangindent=\hsssssclindent\fi
  620.   \clauselevel=6
  621.   \hangafter=1
  622.   \edef\testit{#1}%
  623.   \ifx\testit\empty\hangafter0\noindent
  624.   \else
  625.     \leavevmode\unskip\hbox to \sssssclindent{%
  626.       \hskip\ssssclindent
  627.       \ignorespaces #1\hfil}\ignorespaces
  628.   \fi
  629.   \parindent=\the\dimen0\relax
  630.   \aftergroup\ignorespaces}
  631.  
  632. % The Recital macros use \xcl and \xscl
  633. % Recitals have the same indentation as Clauses.
  634.  
  635. \def\rec{\clauselevel=0%
  636.   \advance\recno by1 \xcl{(\char\the\recno)}}% Letter A
  637. \def\srec{\clauselevel=0
  638.   \advance\sclno by1 \xscl{(\romannumeral\the\sclno)}}% Small Roman i
  639.  
  640. % Now Clauses etc
  641.  
  642. \def\normalnumbering{%
  643.   \def\cl{\advance\clno by1\xcl{\the\clno.}}%
  644.   \def\scl{\advance\sclno by1\xscl{(\the\sclno)}}%
  645.   \def\sscl{\advance\ssclno by1\xsscl{(\char\the\ssclno)}}%
  646.   \def\ssscl{\advance\sssclno by1\xssscl{%
  647.     (\romannumeral\the\sssclno)}}%
  648.   \def\sssscl{\advance\ssssclno by1 \advance\greekno by1\xsssscl{%
  649.     \ifgreek($\mathchar\the\greekno$)
  650.     \else(\char\the\ssssclno\char\the\ssssclno)\fi}}%
  651.   \def\ssssscl{\advance\sssssclno by1 \advance\cardno by1\xssssscl{%
  652.     \ifcard($\mathchar\the\cardno$)
  653.     \else\ifgreek(\char\the\sssssclno\char\the\sssssclno)
  654.     \else(\char\the\sssssclno\char\the\sssssclno
  655.     \char\the\sssssclno)\fi\fi}}}
  656.  
  657. \def\computernumbering{%
  658.   \clindent=\the\cnindent
  659.   \sclindent=\the\cnindent
  660.   \ssclindent=\the\cnindent
  661.   \sssclindent=\the\cnindent
  662.   \ssssclindent=\the\cnindent
  663.   \sssssclindent=\the\cnindent
  664.   \hclindent=0pt % Indentation of clauses if clindfalse
  665.   \hsclindent=0pt
  666.   \hssclindent=0pt
  667.   \hsssclindent=0pt
  668.   \hssssclindent=0pt
  669.   \hsssssclindent=0pt
  670.   \def\clearssclno{\ssclno=0}%       97 is `a'
  671.   \def\clearssssclno{\ssssclno=0}%
  672.   \def\clearsssssclno{\sssssclno=0}%
  673.   \def\clearrecno{\recno=0}%
  674.   \def\cl{\advance\clno by1\xcl{\the\clno.}}%
  675.   \def\scl{\advance\sclno by1\xscl{\unskip\the\clno.\the\sclno.}}%
  676.   \def\sscl{\advance\ssclno by1\xsscl{%
  677.     \unskip\the\clno.\the\sclno.\the\ssclno.}}%
  678.   \def\ssscl{\advance\sssclno by1\xssscl{%
  679.     \unskip\the\clno.\the\sclno.\the\ssclno.\the\sssclno.}}%
  680.   \def\sssscl{\advance\ssssclno by1\xsssscl{%
  681.     \unskip\the\clno.\the\sclno.\the\ssclno.\the\sssclno\the\ssssclno.}}%
  682.   \def\ssssscl{\advance\sssssclno by1\xssssscl{%
  683.     \unskip\the\clno.\the\sclno.\the\ssclno.%
  684.     \the\sssclno\the\ssssclno.\the\sssssclno.}}%
  685.   \def\rec{\clauselevel=0%
  686.     \advance\recno by1 \xcl{\unskip\the\recno.}}%
  687.   \def\srec{\clauselevel=0
  688.     \advance\sclno by1 \xscl{\unskip\the\recno.\the\sclno.}}%
  689.   \def\hcl##1\par{\cl{\bf##1}\par\nobreak}%
  690.   }
  691.  
  692. % The \ncl "clauses" have the same indentation - but no numbers
  693.  
  694. \def\ncl{\xcl{}}
  695. \def\nscl{\xscl{}}
  696. \def\nsscl{\xsscl{}}
  697. \def\nssscl{\xssscl{}}
  698. \def\nsssscl{\xsssscl{}}
  699. \def\nssssscl{\xssssscl{}}
  700.  
  701. \def\tcl#1{% For use with text or numbers longer than \clindent.
  702.   \clearsclno% Set scl counter to zero
  703.   \dimen0=\the\parindent\parindent=0pt% store current setting
  704.   \ifclind \hangindent=\clindent \else\hangindent=\hclindent\fi
  705.   \clauselevel=1
  706.   \hangafter=1
  707.   \vskip\clskip
  708.   \leavevmode\hbox{% to\clindent{%
  709.     \ignorespaces#1\space}\ignorespaces
  710.   \parindent=\the\dimen0\relax
  711.   \ignorespaces}
  712.  
  713. % \def\tscl etc to follow
  714.  
  715.  
  716. % Part 8
  717.  
  718. % The contents, index and cross-reference macros
  719. % First, the commands to use them
  720.  
  721. \def\contents{\contentstrue \writecontents}
  722. \def\marginalnotes{\marginalnotestrue}
  723.  
  724. % Minor definitions
  725.  
  726. \def\ctstitle#1{\gdef\titlename{\vtop{#1}}}% Title used on Contents page
  727. \ctstitle{}% Default is nothing
  728.  
  729. % Use this for sub-headings in Table of Contents 
  730. \def\stitle#1{% 
  731.   \xdef\next{\write\cont{\string\centerline{%
  732.   \string\vtop{\string#1}}\par
  733.   \string\nobreak\string\medskip}}\next
  734.   \inform{#1}}
  735.  
  736. \def\contentsname{Table of Contents}% Obvious.
  737.  
  738. \gdef\topofcontents{\centerline{\titlefont\titlename}
  739.   \bigskip\centerline{\titlefont\contentsname}
  740.   \vfill} % this material will start the table of contents page
  741. \def\botofcontents{\vfill\eject} % this material will end it
  742. \def\contentspagenumber{-1} % default page number for table of contents
  743. \def\contentsreadfile{\jobname.cts} % file that gets table of contents info
  744. \def\contentswritefile{\jobname.cts} % file that takes it
  745. \def\writecontents{\inform{Opening contents file: }
  746.   \openout\cont=\contentswritefile}
  747. \def\readcontents{\input \contentsreadfile}
  748. \def\leaderfill{\leaders\hbox to .75em{\hss.\hss}\hfil}
  749. \def\clname{Clause}
  750. \def\xreffile{\jobname.xrf}
  751. \def\raggedleft{\leftskip=0pt plus 4em% see tb p101
  752.  \spaceskip=.3333em \xspaceskip=.5em } % Can be used in mnote
  753. \def\bigpenalty{\penalty10000\ }
  754. \def\xrfwarn#1{%
  755.    \xrfmissingtrue
  756.    \warn{This cross-reference (#1) does not exist.}
  757.    \inform{Re-run TeX on the file.}
  758.    }
  759.  
  760. % Now the contents macros themselves.
  761.  
  762. \def\printcontents{% Print the contents
  763.   \write\cont{}% ensure that the contents file isn't empty  
  764.   \immediate\closeout\cont% contents information has been fully gathered
  765.   \pageno=\contentspagenumber
  766.   \inform{Table of contents: }%
  767.   \topofcontents
  768.   \line{\hfill Page}%
  769.   \medskip
  770.    \advance\baselineskip by0pt plus1pt minus0pt % add some give
  771.    \readcontents\relax % read the contents info
  772.    \botofcontents }% print the contents page(s), don't terminate
  773.  
  774. % TUGboat 1987/3/310 + tb p 423
  775.  
  776. \let\hat=\^ % Is this necessary?
  777.  
  778. % Note that the order of the lines in \specialhat is critical
  779.  
  780. \def\specialhat{\ifmmode\def\next{^}
  781.   \else\let\next=\checkit\fi\next}
  782. \def\checkit{\futurelet\next\testdoublehat}
  783. \def\testdoublehat{\ifx\next\specialhat\let\next=\silentnote
  784.   \else\visibletrue\let\next=\anote\fi \next}%
  785. \catcode`\^=\active \let ^=\specialhat
  786. \def\silentnote^{\visiblefalse\anote}% 
  787. \def\mnote#1{%
  788.   \strut\vadjust{%
  789.     \kern-\dp\strutbox
  790.     \vtop to \dp\strutbox{%
  791.       \vss\baselineskip=\dp\strutbox
  792. %     \moveleft\notespace
  793.       \moveright\notespace\rightline{%
  794.         \rlap{%
  795.           \hbox{%
  796.             \ninebase=12pt \ninepoint
  797.             \vbox to \ht\strutbox{%
  798.               \hsize\maxnote \raggedright
  799.               \tolerance=1000
  800.               \leftskip=0pt
  801.               \rightskip=0pt plus.6\maxnote
  802.               \noindent\bf\strut#1% \strut
  803.               \vss
  804.               }% end of \vbox to \ht\strutbox
  805.             }% end of \hbox
  806.           }%  end of \rlap
  807.         } % end of \rightline
  808.       \null
  809.       }% end of \vtop tp \dp\strutbox
  810.     }% end of \vadjust
  811.   }% end of \mnote
  812.  
  813. % Note that this now works on the basis that a space before the 
  814. % macro is neutral, ie printed unless it follows a macro
  815. % and a space following the macro is ignored. Therefore no added \space
  816. % at the beginning of \silentnote and ignorespaces at the end of \anote
  817. % and possibly also of \mnote.
  818.  
  819. \def\anote#1{%
  820.   \ifvisible\null\fi
  821.   \ifmarginalnotes\ignorespaces\mnote{#1}\fi
  822.   \ifcontents\ifcase\number\clauselevel% 
  823.     \contentsentry{#1}% \clauselevel=0
  824.     \or\clcont{#1}%     \clauselevel=1
  825.     \or\sclcont{#1}%    \clauselevel=2
  826.     \or\ssclcont{#1}%   \clauselevel=3
  827.     \or\sssclcont{#1}%  \clauselevel=4
  828.     \or\inform{This (#1) will not appear in the table of contents}% =5
  829.     \or\inform{This (#1) will not appear in the table of contents}% =6
  830.     \fi\fi%
  831.   \ifvisible#1\else\unskip\ignorespaces\fi
  832. }%
  833.  
  834. % Now the macros to deal with \cl etc in contents
  835.  
  836. \def\clcont#1{%
  837.   \xdef\next{\write\cont{\string\line{%
  838.   \setbox0=\hbox{\clname\ \hbox to 20pt{\testit\hfil}}%
  839.   \global\clnamelength=\wd0\copy0#1
  840.   \string\leaderfill\noexpand\number\pageno}}}\next
  841.   \inform{\testit\space#1}}%
  842.  
  843. \def\sclcont#1{%
  844.   \xdef\next{\write\cont{\line{\hskip\clnamelength%
  845.   \hbox to 25pt{\testit\hfil}#1
  846.   \string\leaderfill\noexpand\number\pageno}}}\next%
  847.   \inform{  \testit\space#1}}%
  848.  
  849. \def\ssclcont#1{%
  850.   \xdef\next{\write\cont{\line{\hskip\clnamelength\hskip25pt%
  851.   \hbox to 20pt{\testit\hfil}#1
  852.   \string\leaderfill\noexpand\number\pageno}}}\next%
  853.   \inform{      [ascii \testit] #1}} 
  854.  
  855. \def\sssclcont#1{%
  856.   \xdef\next{\write\cont{\line{\hskip\clnamelength\hskip45pt%
  857.   \hbox to 20pt{\testit\hfil}#1
  858.   \string\leaderfill\noexpand\number\pageno}}}\next%
  859.   \inform{      (\romannumeral\the\sssclno) #1}} 
  860.  
  861. \def\contentsentry#1{%
  862.   \xdef\next{\write\cont{\line{#1
  863.     \string\leaderfill\noexpand\number\pageno}}}\next%
  864.   \inform{#1}} % Use this as eg \contentsentry{Parties}
  865.  
  866.  
  867. % These are the cross-ref macros by S v. B (adapted)
  868.  
  869. % First, do we have xrefs?
  870.  
  871. \def\checkoldxrf{%
  872.   \ifoldxrffile\let\next\relax\else\let\next\getxrefs\fi\next}
  873.  
  874. \gdef\getxrefs{%
  875.   \null\global\oldxrffiletrue\inform{Opening xrf file }%
  876.   \immediate\openin\xrf=\xreffile\relax
  877.   \ifeof\xrf
  878.    \xrfmissingtrue
  879.    \inform{}%
  880.    \inform{WARNING: \xreffile\space is empty, or does not exist.}%
  881.    \inform{Re-run TeX on the file.}%
  882.    \inform{}%
  883.   \else\xrefstrue\fi
  884.   \immediate\closein\xrf\relax
  885.   \ifxrefs\input\xreffile\relax\fi
  886.   \immediate\openout\xrf=\xreffile\relax
  887.   }
  888.  
  889. \def\newxref #1#2#3#4#5#6{%
  890.   \expandafter\gdef\csname CLREF-#1\endcsname{#2%
  891.       \inform{    (Cross-reference to #2)}}%
  892.   \expandafter\gdef\csname PAGEREF-#1\endcsname{#6%
  893.       \inform{    (Cross-reference to #6)}}%
  894.   \expandafter\gdef\csname NOTEREF-#1\endcsname{#3%
  895.       \inform{    (Cross-reference to #3)}}%
  896.   \expandafter\gdef\csname SCHEDREF-#1\endcsname{#4%
  897.       \inform{    (Cross-reference to #4)}}%
  898.   \expandafter\gdef\csname APPREF-#1\endcsname{#5%
  899.       \inform{    (Cross-reference to #5)}}%
  900.   }
  901.  
  902. \def\clref#1{%
  903.   \checkoldxrf
  904.   \expandafter
  905.    \ifx\csname CLREF-#1\endcsname\relax\xrfwarn{#1}\unskip[Clause ???]\fi
  906.   \csname CLREF-#1\endcsname
  907.   }
  908.  
  909. \def\pararef#1{%
  910.   \begingroup
  911.    \def\clause{Paragraph}%
  912.    \def\subclause{sub-paragraph}%
  913.    \def\paragraph{sub-sub-paragraph}%
  914.    \def\subparagraph{sub-sub-sub-paragraph}%
  915.    \clref{#1}%
  916.   \endgroup
  917.   }
  918.  
  919. \def\pageref #1{%
  920.   \checkoldxrf
  921.   \ignorespaces
  922.   \expandafter
  923.    \ifx\csname PAGEREF-#1\endcsname\relax\xrfwarn{#1}\unskip[Page ???]\fi
  924.   \csname PAGEREF-#1\endcsname
  925.   }
  926.  
  927. \def\noteref #1{%
  928.   \checkoldxrf
  929.   \ignorespaces
  930.   \expandafter
  931.    \ifx\csname NOTEREF-#1\endcsname\relax\xrfwarn{#1}\unskip[Footnote ???]\fi
  932.   \csname NOTEREF-#1\endcsname
  933.   }
  934.  
  935. \def\schedref #1{%
  936.   \checkaux
  937.   \checkoldxrf
  938.   \ignorespaces
  939.   \ifmanyscheds
  940.     \expandafter
  941.     \ifx\csname SCHEDREF-#1\endcsname\relax\xrfwarn{#1}\unskip[Schedule ???]\fi
  942.     \csname SCHEDREF-#1\endcsname
  943.   \else\xrfwarn{#1} the Schedule %
  944.   \fi
  945.   }
  946.  
  947. \def\appref #1{%
  948.   \checkauxref
  949.   \checkoldxrf
  950.   \ignorespaces
  951.   \ifmanyappends
  952.     \expandafter
  953.     \ifx\csname APPREF-#1\endcsname\relax\xrfwarn{#1}\unskip[Appendix ???]\fi
  954.     \csname APPREF-#1\endcsname
  955.   \else\xrfwarn{#1} the Appendix %
  956.   \fi
  957.   }
  958.  
  959. \def\xrfwarn#1{%
  960.    \xrfmissingtrue
  961.    \warn{This cross-reference (#1) does not exist.}%
  962.    \inform{Re-run TeX on the file.}%
  963.    }
  964.  
  965. \def\writexref{\write\xrf}
  966. \def\nsnbps{\noexpand\string\noexpand\bigpenalty\space}% shorthand
  967. \def\nsn{\noexpand\string\noexpand}
  968.  
  969. \def\clause{Clause}
  970. \def\subclause{sub-clause}
  971. \def\paragraph{paragraph}
  972. \def\subparagraph{sub-paragraph}
  973.  
  974. \def\xref#1{%
  975.   \checkoldxrf
  976.   \ignorespaces 
  977.   \xdef\fct{\the\footmarkcount@}%
  978.   \xdef\schct{\fullnumbers{\the\schedcount}}%
  979.   \xdef\appct{\fullnumbers{\the\appendixcount}}%
  980.   \edef\xreftemp{%
  981.     \nsn\ignorespaces%
  982.     \nsn\newxref%
  983.     {#1}% becomes Parameter 1 to \newxref
  984.     {\ifcase\number\clauselevel%
  985.        \or \nsn\clause\nsnbps\the\clno%
  986.        \or \nsn\subclause\nsnbps(\the\sclno)%
  987.        \or \nsn\paragraph\nsnbps(\char\the\ssclno)%
  988.        \or \nsn\subparagraph\nsnbps(\romannumeral\the\sssclno)%
  989.      \fi}% becomes Parameter 2 to \newxref
  990.     {Footnote\nsnbps\fct}% becomes Parameter 3 to \newxref
  991.     {the \schct\nsnbps Schedule}% becomes Parameter 4 to \newxref
  992.     {the \appct\nsnbps Appendix}% becomes Parameter 5 to \newxref
  993.     }% End of \xreftemp
  994.   \expandafter\expandafter\expandafter%
  995.    \writexref\expandafter{%
  996.     \xreftemp{%
  997.       Page\noexpand\bigpenalty\the\pageno\noexpand\ignorespaces}% Param 6 to \newxref
  998.     \string\unskip}%
  999.     \unskip\ignorespaces}% Final unskip now unnec.
  1000.  
  1001. % Gulp
  1002.  
  1003.  
  1004. % Part 9 - Miscellaneous macros start here:
  1005.  
  1006. \def\hangit{\hangindent\clindent}
  1007.  
  1008. \def\per{\ca per\se}
  1009.  
  1010. \def\ruledtable{% Get TeXsis macros
  1011.   \input txsruled\relax
  1012.   \ruledtable}
  1013.  
  1014. \def\nofancystuff{% Get rid of fancy fonts, disliked by \write's
  1015.   \def\xo{}\def\xxo{}\def\xxxo{}%
  1016.   \def\ul{}\def\uul{}\def\uuul{}%
  1017.   \def\setamendcount##1{}%
  1018.   \def\ignorespaces{}%
  1019.   \def\bigpenalty{ }}
  1020.  
  1021. \def\inform#1{{\nofancystuff\immediate\write16{#1}}}
  1022. \def\warn#1{{\nofancystuff\immediate\write16{}\immediate\write16{WARNING: #1}
  1023.   \immediate\write16{}}}
  1024.  
  1025. % Manmac macros for verbatim scanning
  1026. \chardef\other=12
  1027. \def\ttverbatim{\begingroup
  1028.   \catcode`\\=\other
  1029.   \catcode`\{=\other
  1030.   \catcode`\}=\other
  1031.   \catcode`\$=\other
  1032.   \catcode`\&=\other
  1033.   \catcode`\#=\other
  1034.   \catcode`\%=\other
  1035.   \catcode`\~=\other
  1036.   \catcode`\_=\other
  1037.   \catcode`\^=\other
  1038.   \catcode`\*=\other
  1039.   \obeyspaces \obeylines \tt}
  1040.  
  1041. \outer\def\begintt{$$\let\par=\endgraf \ttverbatim \parskip=\z@
  1042.   \catcode`\|=0 \rightskip-5pc \ttfinish}
  1043. {\catcode`\|=0 |catcode`|\=\other % | is temporary escape character
  1044.   |obeylines % end of line is active
  1045.   |gdef|ttfinish#1^^M#2\endtt{#1|vbox{#2}|endgroup$$}}
  1046. \catcode`\|=\active
  1047. {\catcode`\^=7
  1048. \obeylines \gdef|{\ttverbatim \spaceskip\ttglue \let^^M=\  \let|=\endgroup}}
  1049.  
  1050. % macros to demarcate lines quoted from TeX source files
  1051. \def\beginlines{\par\begingroup\nobreak\medskip\parindent\z@ \obeylines
  1052.   \hrule\kern1pt\nobreak \everypar{\strut}}
  1053. \def\nrbeginlines{\par\begingroup\nobreak\medskip\parindent\z@ \obeylines
  1054.   \kern1pt\nobreak \everypar{\strut}}
  1055. \def\endlines{\kern1pt\hrule\endgroup\medbreak\noindent}
  1056. \def\weakendlines{\kern1pt\hrule\endgroup\medskip\noindent}
  1057. \def\finalendlines{\kern1pt\hrule\endgroup\medbreak}
  1058. \def\nrendlines{\kern1pt\endgroup\smallskip\noindent}
  1059.  
  1060. \gdef\blank{\space\hglue\blankskip}%5 Oct 90
  1061.  
  1062. \def\noaddr{\phantom{11}\blank\phantom{Rail-}\blank
  1063.   \phantom{way}\blank\phantom{Cutt-}\blank\phantom{ings}
  1064.   \blank\phantom{Cheam}\blank
  1065.   \phantom{Lon-}\blank\phantom{don}\blank\phantom{SW12}
  1066.   \blank}
  1067.  
  1068. \gdef\noday{\phantom{31st\ }\blank}
  1069. \gdef\nomonth{\phantom{January\ }\blank}
  1070. \gdef\noyear{\noday\ day of %
  1071.   \nomonth\ }
  1072. \gdef\nodate{\noyear\number\year\penalty-150\maybespace}
  1073.  
  1074. \def\noname{\phantom{Anthony}\blank\phantom{Aloy-}
  1075.   \blank\phantom{nsius }\blank\phantom{Hancock}
  1076.   \blank}
  1077.  
  1078. \def\nopounds{\pounds\phantom{50,000}\maybespace}
  1079.  
  1080. \gdef\initials#1{\xdef\inits{#1}} 
  1081.   \initials{}
  1082. \def\exhibit{\advance\exno by1 ``\hbox{\ifx\inits{}
  1083.   \else\inits\,\ignorespaces\fi\the\exno}''}
  1084.  
  1085. \def\exhibited{produced and shown to me marked \exhibit\maybespace}
  1086.  
  1087. \def\bundled{produced and shown to me bundled together %
  1088.   and marked \exhibit\maybespace} % note maybespace
  1089.  
  1090. \newif\ifversion
  1091. \gdef\version#1{%
  1092.  \versiontrue
  1093.  \edef\versno{#1}
  1094.  \footline={\llap{\fiverm\versno}\hss\tenrm\folio\hss}}
  1095.  
  1096. % Amstex oldnos macros:
  1097. \def\oldnos#1{\ifmmode{\mathcode`\,="013B \fam\@ne#1}\else
  1098.   \leavevmode\hbox{$\mathcode`\,="013B \fam\@ne#1$}\fi}
  1099.  
  1100. % minor macros from manmac
  1101. \def\bull{\vrule height .9ex width .8ex depth -.1ex } % square bullet
  1102. \def\|{\leavevmode\hbox{\tt\char`\|}} % vertical line
  1103. \def\]{\leavevmode\hbox{\tt\char`\ }} % visible space
  1104.  
  1105. \def\Filbreak{\par\vskip\bigskipamount % used in \ssd etc.
  1106.  \vfil\penalty-200\vfilneg} % Adapted from \filbreak
  1107.  
  1108. % \today etc
  1109.  
  1110. \def\st{st}
  1111. \def\nd{nd}
  1112. \def\rd{rd}
  1113. \def\th{th}
  1114.  
  1115. \def\addsuffix#1{#1\ignorespaces\ifcase#1%
  1116.   \or\st\or\nd\or\rd\or\th\or\th\or\th\or\th\or\th\or\th\or\th
  1117.   \or\th\or\th\or\th\or\th\or\th\or\th\or\th\or\th\or\th\or\th
  1118.   \or\st\or\nd\or\rd\or\th\or\th\or\th\or\th\or\th\or\th\or\th\or\st\fi}
  1119.  
  1120. \def\today{%
  1121.   \addsuffix{\number\day}%
  1122.   \space
  1123.   \ifcase\month\or January\or February\or March\or April\or May\or
  1124.   June\or July\or August\or September\or October\or November\or December\fi
  1125.   \ifnocommaindate\space\else,\space\fi
  1126.   \number\year}
  1127.  
  1128. \def\longtoday{%
  1129.   \addsuffix{\number\day}%
  1130.   \space
  1131.   day of\space
  1132.   \ifcase\month\or January\or February\or March\or April\or May\or
  1133.   June\or July\or August\or September\or October\or November\or December\fi
  1134.   \ifnocommaindate\space\else,\space\fi
  1135.   \number\year}
  1136.   
  1137. \newif\ifwrongmonth
  1138. \newcount\feb
  1139.  
  1140. \def\leapcheck{%
  1141.  \count0=\number\year
  1142.  \advance\count0 by-1900
  1143.  \count1=\the\count0
  1144.  \divide\count0 by4
  1145.  \multiply\count0 by4
  1146.  \ifnum\count0=\number\count1
  1147.   \feb=29%
  1148.   \else\feb=28%
  1149.  \fi}
  1150.  
  1151. \def\increasedays{%
  1152.   \ifcase\month% month 0
  1153.    \or\daysinmonth{31}% jan
  1154.    \or\leapcheck\daysinmonth{\feb}% feb. Not a leap year
  1155.    \or\daysinmonth{31}% mar
  1156.    \or\daysinmonth{30}% apr
  1157.    \or\daysinmonth{31}% may
  1158.    \or\daysinmonth{30}% jun
  1159.    \or\daysinmonth{31}% jul
  1160.    \or\daysinmonth{31}% aug
  1161.    \or\daysinmonth{30}% sep
  1162.    \or\daysinmonth{31}% oct
  1163.    \or\daysinmonth{30}% nov
  1164.    \or\daysinmonth{31}% dec
  1165.   \fi}
  1166.  
  1167. \def\reducedays{%
  1168.   \ifcase\month% month 0
  1169.    \or\daysinlastmonth{31}% dec
  1170.    \or\daysinlastmonth{31}% jan
  1171.    \or\leapcheck\daysinlastmonth{\feb}% feb. Not a leap year
  1172.    \or\daysinlastmonth{31}% mar
  1173.    \or\daysinlastmonth{30}% apr
  1174.    \or\daysinlastmonth{31}% may
  1175.    \or\daysinlastmonth{30}% jun
  1176.    \or\daysinlastmonth{31}% jul
  1177.    \or\daysinlastmonth{31}% aug
  1178.    \or\daysinlastmonth{30}% sep
  1179.    \or\daysinlastmonth{31}% oct
  1180.    \or\daysinlastmonth{30}% nov
  1181.   \fi}
  1182.  
  1183. \def\daysinmonth#1{%
  1184.  \ifnum\day>#1 \wrongmonthtrue
  1185.   \advance\day by-#1 
  1186.   \advance\month by1
  1187.   \ifnum\month=13 \month=1
  1188.    \advance\year by1
  1189.   \fi
  1190.  \fi}
  1191.  
  1192. \def\daysinlastmonth#1{%
  1193.  \ifnum\day<1 \wrongmonthtrue
  1194.   \advance\day by#1 
  1195.   \advance\month by-1
  1196.   \ifnum\month=0 \month=12
  1197.    \advance\year by-1
  1198.   \fi
  1199.  \fi}
  1200.  
  1201. \def\futureday#1{%
  1202.  {\advance\day by#1
  1203.   \loop
  1204.   \wrongmonthfalse
  1205.    \begingroup
  1206.      \ifnum#1<0 
  1207.       \aftergroup\reducedays
  1208.      \else 
  1209.       \aftergroup\increasedays
  1210.      \fi
  1211.    \endgroup
  1212.  \ifwrongmonth
  1213.   \repeat
  1214.  \today
  1215.  }}
  1216.  
  1217. \def\tomorrow{%
  1218.   \futureday{1}}
  1219.  
  1220. \def\yesterday{%
  1221.   \futureday{-1}}
  1222.  
  1223. % Taken from the LaTeX extensions.sty
  1224. \def\@dow{\count2 }                        % gets day of the week
  1225. \def\@leap{\count5 }                       % leap year fingaler
  1226. \def\@x{\count6 }                          % temp register
  1227. \def\@y{\count7 }                          % another temp register
  1228.  
  1229.  
  1230. \def\dayofweek{{%
  1231. %            leap = year + (month - 14)/12;
  1232.   \@leap=\month \advance\@leap by -14 \divide\@leap by 12
  1233.   \advance\@leap by \year
  1234. %            dow = (13 * (month + 10 - (month + 10)/13*12) - 1)/5
  1235.   \@dow=\month \advance\@dow by 10
  1236.   \@y=\@dow \divide\@y by 13 \multiply\@y by 12
  1237.   \advance\@dow by -\@y \multiply\@dow by 13 \advance\@dow by -1 \divide\@dow by 5
  1238. %            dow += day + 77 + 5 * (leap % 100)/4
  1239.   \advance\@dow by \day \advance\@dow by 77
  1240.   \@x=\@leap \@y=\@x \divide\@y by 100 \multiply\@y by 100 \advance\@x by -\@y
  1241.   \multiply\@x by 5 \divide\@x by 4 \advance\@dow by \@x
  1242. %            dow += leap / 400
  1243.   \@x=\@leap \divide\@x by 400 \advance\@dow by \@x
  1244. %            dow -= leap / 100 * 2;
  1245. %            dow = (dow % 7)
  1246.   \@x=\@leap \divide\@x by 100 \multiply\@x by 2 \advance\@dow by -\@x
  1247.   \@x=\@dow \divide\@x by 7 \multiply\@x by 7 \advance\@dow by -\@x
  1248.   \ifcase\@dow Sunday\or Monday\or Tuesday\or Wednesday\or
  1249.       Thursday\or Friday\or Saturday\fi}}
  1250.  
  1251.  
  1252. % The signature macros. These have been simplified & extended.
  1253.  
  1254. \edef\lincoln{\hbox{Lincoln's Inn}}
  1255. \def\grays{\hbox{Gray's Inn}}
  1256. \def\temple{\hbox{\Temple}}
  1257. \def\middletemple{\hbox{Middle Temple}}
  1258. \def\innertemple{\hbox{Inner Temple}}
  1259. \let\inn=\lincoln
  1260.  
  1261. \def\signed{%
  1262.   \par\nobreak
  1263.   \vfill
  1264.   \hbox{\hskip\signindent\vtop{%
  1265.   \parindent0pt
  1266.   \inn
  1267.   \hbox{\today}}}
  1268.   \vfill\vfill}
  1269.  
  1270. \def\csettled#1{%
  1271.   \par\nobreak
  1272.   \vfill
  1273.   \hbox{\hskip\signindent\vtop{%
  1274.   \advance\hsize by-\signindent
  1275.   \parindent0pt
  1276.   \raggedright\tolerance=1000
  1277.   Settled, \ignorespaces#1
  1278.   \vskip\settledgap
  1279.   \inn
  1280.   \hbox{\today}}}
  1281.   \vfill\vfill}
  1282.  
  1283. \def\cresettled#1{% Note the \par
  1284.   \par\nobreak
  1285.   \vfill
  1286.   \hbox{\hskip\signindent\vtop{%
  1287.   \advance\hsize by-\signindent
  1288.   \parindent0pt
  1289.   \raggedright\tolerance=1000
  1290.   Re-Settled, \ignorespaces#1
  1291.   \vskip\settledgap
  1292.   \inn
  1293.   \hbox{\today}}}
  1294.   \vfill\vfill}
  1295.  
  1296. \gdef\settled{%
  1297.   \csettled{}}
  1298.  
  1299. \def\resettled{%
  1300.   \cresettled{}}
  1301.  
  1302. \def\jointsettled{%
  1303.   \multiply\settledgap by2
  1304.   \csettled{}}
  1305.  
  1306.  
  1307. % Part 10
  1308.  
  1309. % The signed sealed and delivered macros
  1310.  
  1311. % First, adapt \cases from plain
  1312. \def\rcases#1{\left.\vcenter{\normalbaselines\m@th
  1313.   \ialign{$##\hfil$&\quad##\hfil\crcr#1\crcr}}\,\right\}}
  1314.  
  1315. \def\rbracket#1{\noindent$\rcases{% Put a large bracket at R.
  1316.   \tolerance=3000\pretolerance=3000\parskip=0pt\hfuzz=1.75pt
  1317.   \hbadness=9999
  1318.   \doublehyphendemerits=200
  1319.   \finalhyphendemerits=200
  1320.   \adjdemerits=200
  1321.   \vbox{\hsize=\rbracketsize{#1}}}$}
  1322.  
  1323. \def\lbracket#1{\noindent $\cases{% Put a large bracket at L.
  1324.   \tolerance=2000\pretolerance=2000\parskip=0pt\hfuzz=1.75pt
  1325.   \hbadness=9999
  1326.   \doublehyphendemerits=500
  1327.   \finalhyphendemerits=200
  1328.   \adjdemerits=200
  1329.   \vbox{\hsize=\lbracketsize{#1}}}$}
  1330.  
  1331. \def\ssgen#1{\clauselevel=0%
  1332.   {\raggedright\rbracket{% As \rbracket, but space below text
  1333.   #1\hfil\break\vtop to\brackdepth{}}}}
  1334.  
  1335. % Text for use in contents macros
  1336. \def\attestationtext{Attestation}
  1337. \def\electiontext{Fiscal Election}
  1338. \def\testimoniumtext{Testimonium}
  1339. \def\stampdutytext{Stamp Duty Certificate}
  1340.  
  1341.  
  1342. \def\ssd#1{%
  1343.   \clauselevel=0%
  1344.   \ifnum\ssdcount>0\Filbreak
  1345.   \else
  1346.    \par\nobreak\bigskip\bigskip^^{\attestationtext}%
  1347.   \fi
  1348.   \advance\ssdcount by1
  1349.   \ssgen{\hbox{SIGNED AS A DEED} by %
  1350.   #1 in the presence of---}%
  1351.   \par}
  1352.  
  1353. \def\ssc#1{%
  1354.   \clauselevel=0%
  1355.   \ifnum\ssdcount>0\Filbreak
  1356.   \else
  1357.    \par\nobreak\bigskip\bigskip^^{\attestationtext}%
  1358.   \fi
  1359.   \advance\ssdcount by1
  1360.   \ssgen{\hbox{THE COMMON SEAL of }%
  1361.   #1 was affixed hereunto in the presence of---}%
  1362.   \par}
  1363.  
  1364. \def\ssw#1{%
  1365.   \par\nobreak\bigskip\bigskip^^{\attestationtext}%
  1366.   \ssgen{\brackdepth=1in SIGNED by #1 %
  1367.   the Testator as and for his last Will
  1368.   and Testament in our presence and by us in his---}%
  1369.   \par}
  1370. %
  1371. \def\witness{%
  1372.   \par\clauselevel=0
  1373.   \nobreak\vbox{\bigskip IN WITNESS whereof the parties hereto have signed
  1374.   this instrument as a deed in the presence of the persons mentioned
  1375.   below}^^{\testimoniumtext}%
  1376.   \par}
  1377.  
  1378. \def\singlewitness{%
  1379.   \par\clauselevel=0
  1380.   \nobreak
  1381.   \vbox{\bigskip IN WITNESS whereof this instrument has been signed as
  1382.     a deed in the presence of the person mentioned
  1383.     below}^^{\testimoniumtext}%
  1384.   \par}
  1385.  
  1386. \def\sworn{%
  1387.   \clauselevel=0^^{\attestationtext}%
  1388.   \par\nobreak\vskip3\clskip
  1389.   \vtop{\rbracket{%
  1390.     SWORN at\hfil\break
  1391.     \vtop to\normalbaselineskip{}\hfil\break
  1392.     in the County of\hfil\break
  1393.     this \nodate\break
  1394.     before me---\hfil\break
  1395.    \vtop to\brackdepth{}\hfil\break
  1396.    \hbox{A Solicitor empowered to take Oaths}\hfil}\par}}
  1397.  
  1398. \def\whereas{\medskip\clauselevel=0 WHEREAS---}
  1399. \def\now{\medbreak\clauselevel=0 NOW THIS DEED WITNESSETH as follows---}
  1400. \def\wwhereas{\medskip\clauselevel=0 WHEREAS }
  1401. \def\nnow{\medbreak\clauselevel=0 NOW THIS DEED WITNESSETH }
  1402.  
  1403. \def\witnessetc{\clauselevel=0 \par
  1404.   \nobreak\vbox{\bigskip IN WITNESS, \etc^^{\testimoniumtext}}
  1405.   }
  1406.  
  1407. \def\swornetc{\clauselevel=0 \par
  1408.   \nobreak\vbox{\bigskip SWORN, \etc^^{\testimoniumtext}}
  1409.   }
  1410.  
  1411. \def\election{\par\cl^^{\electiontext}%
  1412.   \unskip\ignorespaces
  1413.   The parties hereto hereby elect %
  1414.   that the provisions of Section~49~(6) of the %
  1415.   Capital Gains Tax Act~1979 %
  1416.   and Section~142~(1) of the Inheritance Tax Act~1984 %
  1417.   shall apply to the variation hereby made\par}
  1418.  
  1419. \def\sdcert#1{\par
  1420.   \cl^^{\stampdutytext}It is hereby certified %
  1421.    that this instrument %
  1422.    falls within category #1 in the Schedule to the %
  1423.    Stamp Duty (Exempt Instruments) Regulations~1987\par}
  1424.  
  1425. \def\dovcert{\sdcert{L}}
  1426. \def\giftcert{\sdcert{M}}
  1427.  
  1428. % Somewhat complicated macros to produce automatically
  1429. % numbered Schedules and Appendixes
  1430.  
  1431. \newcount\appendixcount
  1432. \gdef\appendix{%
  1433.   \checkaux
  1434.   \ifnum\appendixcount=1
  1435.     \write\aux{\noexpand\manyappendstrue}%
  1436.   \fi
  1437.   \clauselevel=0
  1438.   \clearclno
  1439.   \ifnum\appendixcount>0
  1440.     \bigbreak
  1441.   \else
  1442.     \par\nobreak\bigskip
  1443.   \fi
  1444.   \advance\appendixcount by1
  1445.   \ifmanyappends
  1446.     \centerline{^{THE \ucfullnumbers{\the\appendixcount}
  1447.       \unskip\space APPENDIX}}
  1448.   \else
  1449.     \centerline{^{THE APPENDIX}}
  1450.   \fi
  1451.   \nobreak
  1452.   \smallskip}
  1453.  
  1454. \gdef\schedule{%
  1455.   \checkaux
  1456.   \ifnum\schedcount=2
  1457.     \write\aux{\string\manyschedstrue}%
  1458.   \fi
  1459.   \clauselevel=0
  1460.   \clearclno
  1461.   \ifnum\schedcount>0
  1462.     \bigbreak
  1463.   \else
  1464.     \par\nobreak\bigskip
  1465.   \fi
  1466.   \advance\schedcount by1
  1467.   \ifmanyscheds
  1468.     \centerline{^{THE \ucfullnumbers{\the\schedcount}
  1469.      \unskip\space SCHEDULE}}
  1470.   \else
  1471.     \centerline{^{THE SCHEDULE}}
  1472.   \fi
  1473.   \nobreak
  1474.   \smallskip}
  1475.   
  1476. \def\fullnumbers#1{%
  1477.   \ifcase#1% = zeroth
  1478.   \or First%
  1479.   \or Second%
  1480.   \or Third%
  1481.   \or Fourth%
  1482.   \or Fifth%
  1483.   \or Sixth%
  1484.   \or Seventh%
  1485.   \or Eighth%
  1486.   \or Ninth%
  1487.   \or Tenth%
  1488.   \else \blank
  1489.   \fi}
  1490.  
  1491.  \def\ucfullnumbers#1{%
  1492.    \expandafter\expandafter\expandafter\uppercase%
  1493.      \expandafter{\fullnumbers{#1}}
  1494.    }
  1495.  
  1496. \newif\ifmanyappends
  1497. \newif\ifmanyscheds
  1498. \newif\ifauxmissing
  1499. \newif\ifauxfile
  1500. \newif\ifaux
  1501.  
  1502. \def\auxfile{\jobname.aux}
  1503.  
  1504. \newread\aux
  1505. \newwrite\aux
  1506.  
  1507. \def\checkaux{%
  1508.  \ifauxfile\let\next\relax\else\let\next\getaux\fi\next}
  1509.  
  1510. \gdef\getaux{%
  1511.   \null\global\auxfiletrue\inform{Opening aux file }%
  1512.   \immediate\openin\aux=\auxfile\relax% 
  1513.   \ifeof\aux%
  1514.    \auxmissingtrue%
  1515.    \inform{}%
  1516.    \inform{WARNING: \auxfile\space is empty, or does not exist.}%
  1517.    \inform{It may be necessary to re-run TeX on the file.}%
  1518.    \inform{}%
  1519.   \else\auxtrue
  1520.   \fi%
  1521.   \immediate\closein\aux\relax%
  1522.   \ifaux\input\auxfile\relax\fi%
  1523.   \immediate\openout\aux=\auxfile\relax%
  1524.   }
  1525.  
  1526. \def\part#1{% note no \par
  1527.   \ifnum\partcount>0\filbreak\else
  1528.   \par\nobreak\bigskip\fi
  1529.   \advance\partcount by1
  1530.   \centerline{^{Part #1}}\smallskip\nobreak}
  1531.  
  1532. \def\centertext#1{{\skip0=0pt plus.25\hsize
  1533.   \advance \leftskip by \skip0 \advance \rightskip by \skip0 
  1534.   \parfillskip=0pt \spaceskip=.3333em \xspaceskip=.5em 
  1535.   \pretolerance=9999 \tolerance=9999
  1536.   \hyphenpenalty=9999 \exhyphenpenalty=9999 #1\par}}
  1537.  
  1538. \def\maybespace{%
  1539.   \futurelet\next\testforother}
  1540.  
  1541. \def\testforother{% \noexpand is required to avoid \ref being expanded
  1542.   \if\noexpand\next[\let\next=\space % if [  add space
  1543.   \else\if\noexpand\next(\let\next=\space % if (  add space
  1544.   \else\ifcat\noexpand\next.\let\next=\empty % if . no space
  1545. %\else\ifcat\noexpand\next\noexpand\\next=\empty  % if \ no space
  1546. % Don't use. It could cause problems if \space followed \ok or \se
  1547. % It is not required for \ref
  1548.   \else\let\next=\space
  1549. %\fi % relates to \ifcat\\
  1550.   \fi\fi\fi\next}% Note that \ref still generates a space-then eats it
  1551.  
  1552. \def\ca{%
  1553.   \begingroup\it\frenchspacing % This deals with, eg. Ltd. and v.
  1554.   }
  1555. \def\v{\unskip\/\ {\rm v}\maybespace}% taken out of \ca
  1556. \def\se{\unskip\/\endgroup\maybespace}% mod aftergroup
  1557.  
  1558. \def\bo{\def\on{\unskip\/\ {\rm on }}\begingroup\sl\frenchspacing}
  1559. \def\ok{\unskip\/\endgroup\maybespace}
  1560.  
  1561. % U.C. hyphens
  1562. \def\uc-{\discretionary{\raise.25ex\hbox{-}}{}{\raise.25ex\hbox{-}}}
  1563. \def\duc-{\discretionary{\raise.25ex\hbox{-}}{}{}}
  1564.  
  1565. % Quotation macros
  1566. \def\beginquote{\vskip\the\parskip \vskip-\quoteparskip
  1567.   \begingroup\tenpoint
  1568.   \parskip=\quoteparskip \parindent=\quoteparindent
  1569.   \clskip=\smallskipamount
  1570.   \advance\leftskip by \quoteindent \relax
  1571.   \par\ifq\leavevmode\llap{``}\fi
  1572.   \prevgraf=1
  1573.   \DeleteOptionalSpacesandPars{\noindent\ignorespaces}}
  1574.  
  1575. \def\endquote{\ignorespaces\ifq\rlap{''}\fi\par\endgroup}
  1576. \def\beginsclquote{\beginquote\advance\leftskip by-\clindent}
  1577. \def\beginssclquote{\beginquote\advance\leftskip by-\sclindent}
  1578. \def\beginsssclquote{\beginquote\advance\leftskip by-\ssclindent}
  1579.  
  1580. \newcount\quoteparacount \quoteparacount=0
  1581.  
  1582. \long\def\OldQuotes#1\par{%
  1583.   \advance\quoteparacount by1%
  1584.   {\setbox0=\hbox{``}%
  1585.    \setbox1=\vbox{%
  1586.    \storeparindent=\the\parindent
  1587.    \ifnum\quoteparacount=1 \parindent=0pt\fi 
  1588.      \advance\hsize by -1.5\wd0%
  1589.      \advance\hsize-\the\leftskip
  1590.      \leftskip=0pt%
  1591.      \leavevmode
  1592.      \llap{\hbox to 1.5\wd0{%
  1593.        \strut``\hfill}}\unskip#1\unskip\nobreak
  1594.        \parindent=\the\storeparindent}%
  1595.    \vfuzz=10pt                % suppress overfull warnings
  1596.    \splittopskip=0pt          % no skip at top of bix 1
  1597.    \count1=0                  % initialise line count
  1598.    \par\noindent              % start new paragraph
  1599.    \def\rebox{%
  1600.      \advance\count1 by1
  1601.      \ifnum\count1=1\hbox to1.5\wd0{\strut\hfill}\else
  1602.      \ifnum\count1>1\hbox to1.5\wd0{\strut``\hfill}\fi\fi
  1603.      \nobreak
  1604.      \setbox2=\vsplit 1 to6.1pt
  1605.        \vbox{\unvbox2\unskip}%
  1606.        \hskip 0pt plus 0pt\relax}%
  1607.      \loop
  1608.        \rebox                  % do one line at a time
  1609.        \ifdim \ht1>0pt         % test if more lines
  1610.      \repeat
  1611.      \par}}
  1612.  
  1613. \def\EndOldQuotes{\unskip\nobreak\hbox to 1.5\wd0{\hfill\strut''}}
  1614.  
  1615. \newif\ifosq
  1616. \def\newquotes{\osqfalse}
  1617. \def\oldquotes{\osqtrue \begindoublequotes}
  1618.  
  1619. % Set " to produce `` and '' and for use in \oldquotes
  1620. \catcode`\"=\active% Make " an active character
  1621.  
  1622. \gdef\begindoublequotes{%% \begindoublequotes enables "
  1623.     \global\catcode`\"=\active% Make " an active character
  1624.     \global\chardef\dq=`\"% Double-quote char. via \dq
  1625.     \global\let\dblqu@te=L% Always start with a left double-quote
  1626.     }% End of macro
  1627. \let\xxx=\spacefactor% Save the \spacefactor
  1628. \let\dblqu@te=L%
  1629. \gdef"{%
  1630.   \ifinner\else\ifvmode\let\dblqu@te=L\fi\fi
  1631.   \if L\dblqu@te\ifosq\OldQuotes\else``\fi\global\let\dblqu@te=R%
  1632.   \else
  1633.    \let\xxx=\spacefactor% Save the \spacefactor
  1634.    \ifosq\EndOldQuotes\else''\fi\global\let\dblqu@te=L%% Insert '' and reset \dblqu@te
  1635.    \spacefactor\xxx% Reset the \spacefactor
  1636.   \fi% End of \if L\dblqu@te...
  1637.   }% End of " macro
  1638.  
  1639. \gdef\enddoublequotes{%
  1640.   \catcode`\"=12%Set " back to other
  1641.   }
  1642.  
  1643. % Spacing
  1644. \def\,{\hskip.2em\relax}
  1645.  
  1646. % top-lap and bottom-lap - previous name of \tlap was \vlap
  1647. \def\tlap#1{\vbox to 0pt{\vss#1}} % toplap - 14.12.88
  1648. \def\blap#1{\vtop to 0pt{\vss#1}} % bottomlap - 14.12.88
  1649.  
  1650. \def\frac#1/#2{\leavevmode\kern.1em
  1651.   \raise.5ex\hbox{\the\scriptfont0 #1}\kern-.1em
  1652.   /\kern-.15em\lower.25ex\hbox{\the\scriptfont0 #2}}
  1653.  
  1654. \def\vfrac#1/#2{\leavevmode$#1\over#2$\space}
  1655.  
  1656. % Whether these are miscellaneous is a moot point
  1657. % However, here is as good a place as any
  1658.  
  1659. \def\ifsinglepage{% This pair of macros needs amneding
  1660.   \edef\tempfootline{\the\footline}%
  1661.    \ifnum\pageno=1
  1662.     \ifnum\vbadness>9999
  1663.      \footline=\expandafter{\temptfootline}%
  1664.    \else\nopagenumbers\inform{No pagenumbers}\fi\fi}%
  1665.   \def\numberpages{\def\singlepage{}}
  1666.  
  1667. \def\printsp{%
  1668.  \ifsinglepage
  1669.   \vfill\supereject
  1670.   \backmatter\supereject
  1671.  \fi} % should it go here? 
  1672.  
  1673. \outer\def\bye{\par
  1674.  \signoff % This is the signature
  1675.   \vfil\supereject
  1676.   \backmatter\supereject
  1677.   \ifcontents
  1678.    \printcontents\contentsfalse\vfill\supereject
  1679.   \fi
  1680.   \ifxrefs
  1681.    \immediate\write\xrf{\noexpand\unskip}% check. Have all writes been written?
  1682.    \immediate\closeout\xrf
  1683.   \fi
  1684.   \ifxrfmissing
  1685.    \warn{\xreffile\space is missing or incomplete.}%
  1686.    \inform{Run TeX on the file again.}%
  1687.   \fi
  1688.   \ifaux
  1689.    \immediate\write\aux{\noexpand\relax}% check. Have all writes been written?
  1690.    \immediate\closeout\aux
  1691.   \fi
  1692.   \ifauxmissing
  1693.    \warn{\auxfile\space is missing or incomplete.}%
  1694.    \inform{Run TeX on the file again.}%
  1695.   \fi
  1696.   \supereject
  1697.   \iffax\printfaxsheet\fi
  1698.   \ifchit\chit\fi
  1699.   \end} 
  1700.  
  1701. % A fudged bit here to prevent multiple backsheets
  1702. % and additional pages containing rubbish.
  1703. % Will be corrected in next release
  1704.  
  1705. \newif\iflpwbs % if last page was backsheet...
  1706.  
  1707. \def\enddoc{\par
  1708.   \edef\tempfootline{\the\footline}%
  1709.   \iflpwbs\else\signoff\fi % signature/settled
  1710.   \vfill\supereject
  1711.   \iflpwbs\let\backmatter\empty\fi
  1712.   \ifnum\totalpages>1
  1713.     \backmatter\supereject\lpwbstrue
  1714.   \fi% No backsheet unless text!
  1715.   \footline=\expandafter{\tempfootline}%
  1716.   \ifcontents\printcontents\contentsfalse\fi
  1717.   \ifxrefs\immediate\write\xrf{\string\unskip}
  1718.   \fi
  1719.   \ifxrfmissing
  1720.    \inform{}%
  1721.    \inform{WARNING: \xreffile\space is missing or incomplete.}%
  1722.    \inform{}%
  1723.    \inform{Run TeX on the file again.}%
  1724.   \inform{}%
  1725.   \fi
  1726.   \ifaux\immediate\write\aux{\string\unskip}%
  1727.   \fi
  1728.   \ifauxmissing % is this necessary?
  1729.   \inform{}%
  1730.   \inform{WARNING: \auxfile\space is missing or incomplete.}%
  1731.   \inform{}%
  1732.   \inform{Run TeX on the file again.}%
  1733.   \inform{}%
  1734.   \fi
  1735.   \reset
  1736.   }
  1737.  
  1738. \def\counsel#1{\edef\counselname{#1}}
  1739.  
  1740. \def\formalcounselname{Mr.~\counselname}
  1741.  
  1742. \def\signature{\par\nobreak\vskip\the\clskip
  1743.  \hskip\signindent\ifx\counselname\undefined{[{\it Counsel's Name\/}]}%
  1744.  \else\counselname\fi
  1745.  \medskip}
  1746.  
  1747. % Other misc macros---
  1748. \def\etc{{\it \&c\/}.}
  1749.  
  1750. \newdimen\surround \surround=5pt
  1751. \def\Boxit#1#2{\vbox{\hrule\hbox{\vrule\kern#1
  1752.  \vbox{\kern#1#2\kern#1}\kern#1\vrule}\hrule}}
  1753.  
  1754.  
  1755. % Part 11 - backsheet macros
  1756.  
  1757. % Miscellaneous
  1758.  
  1759. \def\upperc#1{% This enable the first line to be UC
  1760.   \ifucfirstline\uppercase{#1} \gdef\upperc##1{##1}\else{#1}\fi}
  1761.  
  1762. \def\shift{% Full size or half size backsheets
  1763.   \iffullsize\null\else{\hskip1in\hskip.5\hsize}\fi} 
  1764. % The 1in \hskip in the previous line = the margin of the half size page
  1765.  
  1766. \def\xcenterline#1{\line{\shift\hss#1\hss}}
  1767. \def\centervers#1{\line{\llap{\fiverm\version}\shift\hss#1\hss}}
  1768.  
  1769. % Macros to extract names from files
  1770.  
  1771. \def\sols{} % Prevents error messages if undefined
  1772. \def\solname{} % ditto
  1773. \def\sname#1/#2\par{#1} % Used to extract solname from cref
  1774.  
  1775. \def\z:#1:#2\par{%
  1776.   \def\anyname{#1}\ifx\solname\anyname
  1777.   \afterassignment\endinput\def\sols{#2}\fi}
  1778.  
  1779. \gdef\getaddress{%
  1780.    \ifx\cref\empty
  1781.      \edef\solname{not given, and so}
  1782.    \else
  1783.      \edef\solname{\expandafter\sname\cref/\par}%
  1784.    \fi
  1785.    \ifx\sols\empty
  1786.      \ifx\cref\empty\else\input\addressfile\relax\fi
  1787.    \fi
  1788.    \ifx\sols\empty
  1789.       \warn{Reference \solname\space not found in file "\addressfile"}%
  1790.    \fi}
  1791.  
  1792. % Set up the parameters
  1793.  
  1794. \def\bsparams{%
  1795.  \tolerance=7500
  1796.  \doublehyphendemerits=0
  1797.  \finalhyphendemerits=10000
  1798.  \hyphenpenalty=100
  1799.  \parindent=0pt
  1800.  \normalbottom
  1801.  \pageno=0
  1802.  \nopagenumbers
  1803.   \advance\vsize\bstopincrease  \advance\vsize\bsbotincrease
  1804.   \advance\voffset-\bstopincrease
  1805.   \def\addressfile{solicitors}% name of input file
  1806.   \twelvebase=12pt\twelvepoint
  1807.   \inform{Backsheet for \ifdraft draft \fi\doctype}%
  1808.  }
  1809.  
  1810. % Backsheets for Opinions
  1811. \def\bsop{%
  1812.  \getworkdone
  1813.  \getbstitlewidth
  1814.  \begingroup
  1815.  \capacitytrue
  1816.  \bsparams
  1817.   \ifpleading% try adding \gettitle here and pleadingtrue elsewhere 
  1818.   \else\xcenterline{{\sl\today}}\vfil\fi
  1819.   \xcenterline{\vtop{\openup2\jot
  1820.     \halign{\hfil\vtop{\hsize=\bstitlewidth 
  1821.     \clindent=0pt % I am not sure why this is required. But it is.
  1822.     \centertext{##}}\hfil\cr
  1823.     \title\crcr}}}%
  1824.   \vfil
  1825.    \headerfont
  1826.    \xcenterline{%
  1827.     \setbox0\hbox{\doctype}%
  1828.     \ifdim \wd0<\bstitlewidth\copy0
  1829.      \else\vtop{\hsize=\bstitlewidth\centertext{\doctype}}\fi}%
  1830.   \rm
  1831.    \vfil\vfil
  1832.    \getaddress
  1833.    \halign{\def\temp{##}\xcenterline{\upperc{\temp}}\inform{::\temp::}\cr
  1834.   \sols\crcr}%
  1835.    \smallskip
  1836.    \xcenterline{\eightrm Solicitors' Reference: \sref}%
  1837.    \xcenterline{{\eightrm Counsel's Reference: \col/\cref}}%
  1838.  \supereject
  1839.  \endgroup}
  1840.  
  1841. % Not yet working
  1842. \def\bscopyop{%
  1843.  \getworkdone
  1844.  \getbstitlewidth
  1845.  \begingroup
  1846.  \capacitytrue
  1847.  \bsparams
  1848.   \ifpleading% try adding \gettitle here and pleadingtrue elsewhere 
  1849.   \else\xcenterline{{\sl\today}}\vfil\fi
  1850.   \xcenterline{\vtop{\openup2\jot
  1851.     \halign{\hfil\vtop{\hsize=\bstitlewidth 
  1852.     \clindent=0pt % I am not sure why this is required. But it is.
  1853.     \centertext{##}}\hfil\cr
  1854.     \title\crcr}}}%
  1855. \vfil
  1856.    \headerfont
  1857.    \xcenterline{%
  1858.     \setbox0\hbox{\doctype}%
  1859.     \ifdim \wd0<\bstitlewidth\vtop{%
  1860.          \hbox{\llap{\scaps[copy]}\phantom{\doctype}\strut}%
  1861.          \hbox{\doctype}}
  1862.      \else
  1863.       \vtop{\hsize=\bstitlewidth
  1864.         \centertext{\llap{\scaps[copy]}\break\doctype}}%
  1865.      \fi}%
  1866.   \rm
  1867.    \vfil\vfil
  1868.    \getaddress
  1869.    \halign{\def\temp{##}\xcenterline{\upperc{\temp}}%
  1870.      \inform{::\temp::}\cr
  1871.   \sols\crcr}%
  1872.    \smallskip
  1873.    \xcenterline{\eightrm Solicitors' Reference: \sref}%
  1874.    \xcenterline{{\eightrm Counsel's Reference: \col/\cref}}%
  1875.  \supereject
  1876.  \endgroup}
  1877.  
  1878. \let\doextras\empty
  1879.  
  1880. \def\bsdft{%
  1881.  \doextras
  1882.  \getworkdone
  1883.   \getbstitlewidth
  1884.  \begingroup
  1885.  \capacitytrue
  1886.   \bsparams
  1887. \ifendorsement\bsendorsement\global\endorsementfalse\fi 
  1888.  \ifpleading\null
  1889.    \else\xcenterline{\underbar{DATED\hskip2in \number\year}}%
  1890.    \bigskip
  1891.    \vfil\fi
  1892.   \xcenterline{\vtop{\openup2\jot
  1893.     \halign{\hfil\vtop{\hsize=\bstitlewidth 
  1894.     \clindent=0pt % I am not sure why this is required. But it is.
  1895.     \centertext{##}}\hfil\cr% Are the hfils nec?
  1896.     \title\crcr}}}%
  1897.   \vfil
  1898.   \tabskip=0pt
  1899.   \headerfont
  1900.   \xcenterline{\vtop{\openup2\jot
  1901.   \halign{\hfil##\hfil\cr
  1902.   \ifdraft \llap{\it draft/}\hfill\fi\cr
  1903.   \noalign{\smallskip}%
  1904.   \setbox0\hbox{\doctype}%
  1905.    \ifdim \wd0<\bstitlewidth\copy0
  1906.    \else\vtop{\hsize=\bstitlewidth\centertext{\doctype}}\fi\crcr}}}%
  1907.   \rm
  1908.   \smallskip
  1909.   \vfil\vfil
  1910.  \getaddress
  1911.  \halign{\def\temp{##}\xcenterline{\temp}\inform{::\temp::}\cr
  1912.    \ifx\sols\empty\else\sols\fi\crcr}%
  1913.  \smallskip
  1914.  \ifx\sref\empty
  1915.   \else\xcenterline{{\eightrm Solicitors' Reference: \sref}}\fi
  1916.  \ifx\cref\empty
  1917.   \else\xcenterline{{\eightrm Counsel's Reference: \col/\cref}}\fi
  1918.  \ifversion\leftline{\llap{\fiverm\versno}}\fi
  1919.  \supereject
  1920.  \endgroup
  1921. %\global\maxp@rtywidth=\the\maxpartywidth
  1922. \resetpleadingdefaults}
  1923.  
  1924.  
  1925. % Fee Chits
  1926.  
  1927. % Chit user macros
  1928.  
  1929. \def\solsref#1{\def\sref{#1}}
  1930. \def\colsref#1{\def\cref{#1}}
  1931. \def\timetaken#1{\def\timespent{#1}}
  1932. \def\casetype#1{\def\typeofcase{#1}}
  1933. \def\value#1{\def\amountatstake{#1}}
  1934. \def\difficulty#1{\def\howhard{#1}}
  1935. \def\proposedfee#1{\def\suggestedfee{#1}}
  1936. \def\legalaidno#1{\def\legalaid{#1}}
  1937. \def\comments#1{\def\remarks{#1}}
  1938.  
  1939. % Now the chit macros themselves
  1940. \def\chit{%
  1941.  \begingroup
  1942.   \parindent=0pt
  1943.   \inform{Fee Chit}%
  1944.   \pageno=1
  1945.   \nopagenumbers
  1946.   \def\\{ }
  1947. \maxp@rtywidth=.5\hsize
  1948.   \ifpleading\def\title{\chittitle\hfil}\fi
  1949.   \def\cr{\par}\def\noalign{}%
  1950.   \tenbase=12.5pt \tenpoint
  1951. \def\scriptsize{\let\rm\eightrm}%
  1952.   \def\chittext{%
  1953.    \parskip=0pt
  1954.   \raggedright \tolerance=10000
  1955. \hbadness=10000 
  1956.   \uchyph=0
  1957.    {\bf Date:} \today\quad {\bf cref:} \col/\cref\par
  1958.    {\bf sref:} \sref\par
  1959.    {\bf Title:} {\def\hfill{}\frenchspacing\title\strut}\par
  1960.    {\bf Legal Aid No:} \legalaid\par
  1961.    {\bf Work Done:} \workdone.\par
  1962.    {\bf Time Spent:} \ifx\timespent\empty\else\timespent\ hours\fi\par
  1963.    {\bf Value:} \pounds\amountatstake\par
  1964.    {\bf Difficulty:} \howhard\par
  1965.    {\bf Type of Case:} \typeofcase\par
  1966.    {\bf Suggested Fee:} \pounds\suggestedfee\par
  1967.    {\bf Filename:} {\tt\jobname}\par
  1968.    {\bf Remarks:} \remarks\par
  1969.   }% end of chittext
  1970.   %
  1971.   \leftline{{\it Clerk's Copy}\hfil}
  1972.   \chittext
  1973.   \vskip1in
  1974.   \leftline{{\it Counsel's Copy}\hfil}
  1975.   \chittext
  1976.   \vfil
  1977.   \supereject
  1978.  \endgroup}
  1979.  
  1980. \gdef\getworkdone{%
  1981.   {\nofancystuff
  1982.   \tempwd=\expandafter{\workdone}%
  1983.   \def\temppunct{\expandafter\if\the\tempwd\empty\else, \fi}%
  1984.   \xdef\workdone{\the\tempwd\temppunct
  1985.    \ifx\signoff\settled\ draft \fi\doctype
  1986.   \ifversion\space(\versno)\fi}}}
  1987.  
  1988.  
  1989. % Part 12---Advisory and non-litigious drafting
  1990.  
  1991. % The TUG macros (taken from tugboat.sty) which delete spaces etc
  1992. \def\if@baseis@next{\ifx\@basetoken\@nexttoken}
  1993.  
  1994. \long\def\@checknexttoken #1#2#3{%
  1995.   \futurelet\@basetoken\iffalse#1\fi
  1996.   \long\def\@next{%
  1997.     \if@baseis@next
  1998.       \long\def\@@next{#2}%
  1999.     \else\long\def\@@next{#3}\fi
  2000.     \@@next}%
  2001.   \futurelet\@nexttoken\@next}
  2002.  
  2003. % execute #2 after ignoring (possibly) one occurrence of #1
  2004. \long\def\@ignoreone#1#2{%
  2005.   \def\@ignoreform#1{#2}%
  2006.   \@checknexttoken{#1}{\@ignoreform}{#2}%
  2007.   }
  2008.  
  2009. % execute #2 after ignoring all occurrences of #1
  2010. \long\def\@ignoreall#1#2{%
  2011.   \def\@ignoreform#1{\@ignoretest}%
  2012.   \def\@ignoretest{\@checknexttoken{#1}{\@ignoreform}{#2}}%
  2013.   \@ignoretest
  2014.   }
  2015.  
  2016. % execute #1 after ignoring spaces
  2017. \def\DeleteOptionalSpaces#1{%
  2018.   \@ignoreall{ }{#1}%
  2019.   }
  2020.  
  2021. % execute #1 after ignoring spaces and \pars
  2022. \def\DeleteOptionalSpacesandPars#1{%
  2023.   \@ignoreall{ }{\@ignoreall{\par}{#1}}%
  2024.   }
  2025.  
  2026. %  Checking and reading options.
  2027. %  To check for the next optional argument, the macros must look
  2028. %  ahead to the next character.  If the next character is a `[',
  2029. %  the option-reading mechanism is invoked.  This check may be suppressed if
  2030. %  the user has executed the \lastoption option.  If \@lastoption is
  2031. %  "true" or if the [ is NOT next, the macro goes on to reading any
  2032. %  arguments and executing appropriately.
  2033.  
  2034. \def\@checkoptions{%
  2035.   \if@lastoption
  2036.     \def\@next{\@executetoend}%
  2037.   \else
  2038.     \def\@next{\@checknexttoken {[}{\@readoptions}{\@executetoend}}%
  2039.   \fi
  2040.   \@next
  2041.   }
  2042.  
  2043. % The default parameters used in advisory work
  2044.  
  2045. \def\pageparameters{%
  2046.   \widowpenalty=7500
  2047.   \def\footnoterule{}%
  2048.   \parindent=20pt
  2049.   \quoteindent=20pt
  2050.   \twelvepoint
  2051.   }
  2052.  
  2053. \def\advising#1{%
  2054.   \enddoc
  2055.   \ifpleading\gettitle\fi
  2056.   \pageparameters
  2057.   \inform{#1}%
  2058.   \chittrue % print a fee chit
  2059.   \def\doctype{#1}%
  2060.    \let\backmatter=\bsop
  2061.    \let\signoff=\signed
  2062.   \clindfalse
  2063.   \centerline{\headerfont #1}
  2064.   \nobreak\vskip10pt
  2065.   \DeleteOptionalSpacesandPars{\noindent\ignorespaces}}
  2066.  
  2067.  
  2068. \def\opinion{%
  2069.   \advising{Opinion}}
  2070. \def\note{%
  2071.   \advising{Note}}
  2072. \def\advice{%
  2073.   \advising{Advice}}
  2074. \def\jopinion{%
  2075.   \let\signed\jsigned
  2076.   \advising{Joint Opinion}}
  2077. \def\nopinion{%
  2078.   \advising{}}
  2079. \def\jnote{%
  2080.   \let\signed\jsigned
  2081.   \advising{Joint Note}}
  2082.  
  2083. \def\draftparameters{%
  2084.   \widowpenalty=7500
  2085.   \def\footnoterule{}%
  2086.   \parindent=0pt
  2087.   \quoteindent=\the\clindent
  2088.   \twelvepoint
  2089. }
  2090.  
  2091. \gdef\draft#1{%
  2092.   \ifended\endedfalse
  2093.   \else\enddoc
  2094.   \fi
  2095.   \begingroup
  2096.    \amendtextfalse
  2097.    \gdef\doctype{#1}%
  2098.    \inform{\ifdraft draft \fi#1}%
  2099.   \endgroup
  2100.    \draftparameters
  2101.    \chittrue
  2102.    \let\backmatter=\bsdft
  2103.    \ifdraft\let\signoff\settled % see \chit
  2104.     \else\let\signoff\empty\fi
  2105.    \clindtrue
  2106.    \lpwbsfalse}%
  2107.  
  2108. \def\conference{%
  2109.   \inform{Conference}%
  2110.   \chittrue
  2111.   \def\doctype{Conference}%
  2112.   \getworkdone}% normally set by backsheet
  2113.  
  2114. \def\telcon{%
  2115.   \inform{Telephone Conference}%
  2116.   \chittrue
  2117.   \def\doctype{Telephone Conference}%
  2118.   \getworkdone}
  2119.  
  2120.  
  2121. % Part 13---Pleadings
  2122.  
  2123. % Note: The pleadings macros are in the process of being rewritten. 
  2124. % As a result they contain a blend of stuff from the old and new 
  2125. % systems and some macros have been left in order to provide continuity.
  2126. % In other words, they are a mess at the moment.
  2127.  
  2128. % First a whole block of defs, some of which are no longer needed
  2129. \newdimen\storeparindent
  2130.  
  2131. \def\solicitors{Solicitors} % change to single for sole practitioner
  2132. \def\plaintiffs{} % List macro (tb 378), names of plaintiffs
  2133. \def\defendants{} % ditto, defendants
  2134. \def\thirdparties{} % ditto
  2135. \def\plaintiffsaddrs{} % ditto; addresses
  2136. \def\defendantsaddrs{}
  2137. \def\thirdpartiesaddrs{}
  2138. \def\matters{}  % List macro
  2139. \def\partyname{} % Temporary storage of individual party's name.
  2140. \def\outofrange{\noaddr} % If too few \of's, use blank address.
  2141. \def\courtname{\phantom{BORCHESTER}}%
  2142. \def\issuer{}
  2143. \def\chambers{\blank in \blank,} % Is this necessary?
  2144. \def\depsname{\blank} % name of deponent in aff endorse.
  2145. \def\shortname#1{\def\depsname{#1}}
  2146. \def\capacity#1{\ifcapacity ({\it #1\/})\else\unskip\fi}
  2147.  
  2148. \def\firm{\capacity{a firm}}
  2149. \def\widow{\capacity{Widow}\female}
  2150. \def\minor{\capacity{a Minor}}
  2151. \def\patient{\capacity{a Patient}}
  2152. \def\mw{\capacity{Married Woman}\female}
  2153. \def\co{\capacity{a Company}}
  2154. \def\tradingas#1{\capacity{Trading as #1}}
  2155. \def\as#1{\capacity{#1}}
  2156. \def\female{\unskip
  2157.  \ifplaintiff\femalepltrue\fi
  2158.  \ifdefendant\femaledeftrue\fi
  2159.  \ifthirdparty\femaletptrue\fi}
  2160. %\def\re{}
  2161. %\def\res{}
  2162. \def\theirsols{\noname} % redefine if necessary
  2163. \def\theirsolsaddr{\noaddr} % ditto
  2164. \def\doctype{}
  2165. \def\appellant{\global\appealtrue \plaintiff}
  2166. \def\applicant{\global\applicationtrue \plaintiff}
  2167. \def\respondent{\defendant}
  2168. \def\petitioner{}
  2169. \def\petitioner#1{\global\petitiontrue \def\petitioner{#1}}
  2170. \def\amend{}
  2171. \def\address#1{\def\address{#1}}
  2172. \def\petitionersaddress#1{\def\petitionersaddress{#1}}
  2173. \def\xheading#1{\removelastskip\medskip\goodbreak
  2174.   \noindent{\bf #1}\nobreak}
  2175.  
  2176. \newif\ifappeal
  2177. \newif\ifcountycourt
  2178. \newif\ifcourtofappeal
  2179. \newif\ifpetition
  2180. \newif\ifapplication
  2181.  
  2182. \newif\ifplaintiff
  2183. \newif\ifdefendant
  2184. \newif\ifthirdparty
  2185. \newif\iffourthparty
  2186. \newif\ifappellant
  2187. \newif\ifrespondent
  2188. \newif\ifapplicant
  2189.  
  2190. \newif\ifpluralplaintiff
  2191. \newif\ifpluraldefendant
  2192. \newif\ifpluralthirdparty
  2193. \newif\ifpluralfourthparty
  2194. \newif\ifpluralappellant
  2195. \newif\ifpluralrespondent
  2196. \newif\ifpluralapplicant
  2197.  
  2198. \newif\ifclientpl
  2199. \newif\ifnoparties
  2200. \newif\ifcapacity
  2201. \newif\ifintendedaction
  2202. \newif\ifaffidavit % check this
  2203. \newif\iffemalepl
  2204. \newif\iffemaledef
  2205. \newif\iffemaletp
  2206.  
  2207. \def\intendedparties{\global\intendedactiontrue}
  2208.  
  2209. \def\whenadded{\quad ~~/~~/91}
  2210. \def\added{(added\whenadded)}
  2211.  
  2212. \newcount\plcount % total number of plaintiffs
  2213. \newcount\dfcount % total number of defendants
  2214. \newcount\tpcount % total number of third parties
  2215. \newcount\partyno % This party - temporary storage
  2216. \newcount\testone % Temporary storage
  2217. \newcount\testtwo % Temporary storage
  2218. \newcount\mattercount % No. of Matters.
  2219.  
  2220. \def\claims{%
  2221.    \vskip\the\clskip
  2222.    \clearclno
  2223.    {\scaps And the \plaintfs}\ \wants---}
  2224. \def\claim{\claims}
  2225.  
  2226. % List macros, taken from the T.B. page 378 ff.
  2227.  
  2228. \toksdef\ta=0 \toksdef\tb=2 % token list registers for temp use
  2229. \newcount\cardcount
  2230.  
  2231. \def\rightappenditem#1\to#2{\ta={\\{#1}}\tb=\expandafter{#2}%
  2232.  \edef#2{\the\tb\the\ta}}%
  2233. \def\select#1\of#2\to#3{\def#3{\outofrange}%
  2234.  \long\def\\##1{\advance#1-1 \ifnum#1=0 \def#3{\relax##1}\fi}#2}%
  2235. \def\cardinality#1\to#2{#2=0 \long\def\\##1{\advance#2 by 1 }#1}
  2236.  
  2237.  
  2238. % Some dimensions to help with formatting of parties
  2239.  
  2240. \newdimen\plwidth \plwidth=0pt
  2241. \newdimen\dfwidth \dfwidth=0pt
  2242. \newdimen\tpwidth \tpwidth=0pt
  2243. \newdimen\allwidths \allwidths=0pt
  2244. \newdimen\maxp@rtywidth \maxp@rtywidth=4.5in
  2245. \newdimen\partyhang \partyhang=0pt
  2246.  
  2247. % Macros that add plaintiff's name etc to the list
  2248. % These macros are quite complicated since they use \csname
  2249. % and \endcsname, sometimes to excess
  2250.  
  2251. \def\plaintiffsstuff{}
  2252. \def\defendantsstuff{}
  2253. \def\thirdpartiesstuff{}
  2254. \def\currentpartyaddrs{}
  2255.  
  2256. \newcount\andcount
  2257. \newcount\testthree
  2258. \newcount\testfour
  2259.  
  2260. \newtoks\tc 
  2261. \newtoks\tx
  2262. \newtoks\cpatoks
  2263. \newtoks\cpstoks
  2264. \newtoks\cpsctoks
  2265. \newtoks\cpfctoks
  2266. \newtoks\cpntoks
  2267. \newtoks\cpwtoks
  2268.  
  2269. \def\upit{\global\advance\testtwo by-1
  2270.   \global\advance\testthree by-1}
  2271.  
  2272. \def\uupit{\global\advance\testtwo by0
  2273.   \global\advance\testthree by-2}
  2274.  
  2275. \def\downit{\unskip}
  2276.  
  2277. \def\of#1{% Address of party
  2278.   \advance\andcount by1
  2279.   \edef\abode{%
  2280.    \ifcase\andcount%
  2281.     \or{of}
  2282.     \or{both of}
  2283.    \else{all of}
  2284.    \fi}
  2285.   \ta={\\} \tb=\expandafter{\currentpartyaddrs}%
  2286.   \tc=\expandafter{\abode#1\, }%
  2287.   \expandafter\edef\csname\expandafter
  2288.    \gobble\the\cpatoks\endcsname{\the\tb\the\ta{\the\tc}}%
  2289.   \ta={\\} \tb=\expandafter{\currentpartystuff}%
  2290.    \tc=\expandafter{\downit}%
  2291.   \expandafter\edef\csname\expandafter\gobble\the\cpstoks
  2292.    \endcsname{\the\tb\the\ta{\the\tc}}%
  2293.   \andcount=0
  2294.   }
  2295.  
  2296. \def\and{% For use where two parties have same address
  2297.   \advance\andcount by1
  2298.   \ta={\\} \tb=\expandafter{\currentpartyaddrs}% 
  2299.   \tc=\expandafter{and}%
  2300.   \expandafter\edef\csname\expandafter\gobble\the\cpatoks
  2301.    \endcsname{\the\tb\the\ta{\the\tc}}%
  2302.   \ta={\\} \tb=\expandafter{\currentpartystuff}%
  2303.    \tc=\expandafter{\upit}%
  2304.   \expandafter\edef\csname\expandafter\gobble\the\cpstoks
  2305.    \endcsname{\the\tb\the\ta{\the\tc}}%
  2306.   \expandafter\advance\csname\expandafter\gobble\the\cpsctoks
  2307.    \endcsname by-1
  2308.   }
  2309.  
  2310. % The \, in \tc may not be working
  2311. \def\nand{% For use where more than two parties have same address
  2312.   \advance\andcount by1
  2313.   \ta={\\} \tb=\expandafter{\currentpartyaddrs}%
  2314.    \tc=\expandafter{\, }%
  2315.   \expandafter\edef\csname\expandafter\gobble\the\cpatoks
  2316.    \endcsname{\the\tb\the\ta{\the\tc}}%
  2317.   \ta={\\} \tb=\expandafter{\currentpartystuff}% 
  2318.   \tc=\expandafter{\upit}% Formerly \uupit
  2319.   \expandafter\edef\csname\expandafter\gobble\the\cpstoks
  2320.     \endcsname{\the\tb\the\ta{\the\tc}}%
  2321.   \expandafter\advance\csname\expandafter\gobble\the\cpsctoks
  2322.     \endcsname by-1
  2323.   }
  2324.  
  2325. \def\converttc#1#2{% let <control word> = other word...
  2326.  \expandafter\expandafter\let\expandafter#1%
  2327.   \csname\expandafter\gobble\the#2\endcsname
  2328.  }
  2329.  
  2330. % If this macro is called eg with the parameter \plaintiff
  2331. % it lets eg \currentpartyshortcount=\plaintiffshortcount
  2332.  
  2333. \def\converttokens#1{% A general purpose macro...
  2334.   \cpsctoks=\expandafter{\string#1shortcount}%
  2335.   \converttc{\currentpartyshortcount}{\cpsctoks}%
  2336.   \cpfctoks=\expandafter{\string#1fullcount}%
  2337.   \converttc{\currentpartyfullcount}{\cpfctoks}%
  2338.   \cpatoks=\expandafter{\string#1addrs}%
  2339.   \converttc{\currentpartyaddrs}{\cpatoks}%
  2340.   \cpstoks=\expandafter{\string#1stuff}%
  2341.   \converttc{\currentpartystuff}{\cpstoks}%
  2342.   \cpntoks=\expandafter{\string#1}%
  2343.   \converttc{\currentpartynames}{\cpntoks}%
  2344.   \cpwtoks=\expandafter{\string#1width}%
  2345.   \converttc{\currentpartywidth}{\cpwtoks}%
  2346.   }
  2347.  
  2348. % This macro is calld by eg \plaintiff
  2349. % In that case #1 is \plaintiff and #2 the actual name of the
  2350. % Plaintiff in question (eg JOHN SMITH)
  2351. % In the next edition it will do rather more than it does now.
  2352.  
  2353. \def\party#1#2{%#1=party, #2=name
  2354.   \converttokens{#1}%
  2355.   \unskip
  2356.   \cardinality\currentpartyaddrs\to\cardcount
  2357.   \ifnum\currentpartyfullcount>\the\cardcount
  2358.    \of{\noaddr}%
  2359.   \fi
  2360.   \global\expandafter\advance\csname\expandafter\gobble\the\cpfctoks
  2361.    \endcsname by1
  2362.   \global\expandafter\advance\csname\expandafter\gobble\the\cpsctoks
  2363.    \endcsname by1
  2364.   \setbox0=\hbox{#2}%
  2365.   \ifdim\wd0>\the\maxp@rtywidth
  2366.     \global\csname\expandafter\gobble\the\cpwtoks
  2367.      \endcsname=\the\maxp@rtywidth
  2368.   \else\ifdim\currentpartywidth<\wd0%
  2369.     \csname\expandafter\gobble\the\cpwtoks\endcsname=\wd0
  2370.   \fi\fi
  2371.   \converttc{\currentpartywidth}{\cpwtoks}% Reset
  2372.   \unskip
  2373.   \ifdim\allwidths<\currentpartywidth 
  2374.    \allwidths=\the\currentpartywidth\fi
  2375.   \ta={\\} \tb=\expandafter{\currentpartynames}% 
  2376.   \tc=\expandafter{#2}%
  2377.   \expandafter\edef\csname\expandafter\gobble\the\cpntoks
  2378.    \endcsname{\the\tb\the\ta{\the\tc}}%
  2379.   \ifnum\currentpartyfullcount=1 \andcount=0\fi
  2380.   }
  2381.  
  2382.  
  2383. % This macro recovers the parties so that their names can be formatted
  2384. % The logic in it is still far from perfect
  2385. % It is intended to put "and" in the right place, but sometimes fails...
  2386.  
  2387. \newif\ifnoandneeded
  2388. \edef\testand{\relax and}
  2389.  
  2390. \def\getparties#1#2{% #1=partylist,#2=partytext
  2391.   \converttokens{#1}%
  2392.   \unskip%
  2393.   \testone=0\testtwo=0%
  2394.   \testthree=\the\currentpartyfullcount%
  2395.   \testfour=\the\currentpartyshortcount%
  2396.   \ifnum\currentpartyfullcount>\the\cardcount%
  2397.    \advance\andcount by1%
  2398.    \edef\abode{% Print addresses
  2399.     \ifcase\andcount%
  2400.      \or{of}%
  2401.      \or{both of}%
  2402.     \else{all of}%
  2403.     \fi}%
  2404.    \rightappenditem\abode\to\currentpartyaddrs%
  2405.    \rightappenditem{}\to\currentpartystuff%
  2406.   \fi%
  2407.   \unskip
  2408.   \loop
  2409.    \begingroup
  2410.     \global\advance\testone by1%
  2411.     \global\advance\testtwo by1%
  2412.     \partyno=\the\testone%
  2413.     \select\partyno\of\currentpartynames\to\partyname%
  2414.      \partyno=\the\testone% reset the counter%
  2415.     \select\partyno\of\currentpartyaddrs\to\partyaddress%
  2416.      \partyno=\the\testone% reset the counter
  2417.     \select\partyno\of\currentpartystuff\to\partystuff%
  2418.     \partystuff\unskip\relax%
  2419.       \ifnum\testone>1
  2420.          {\ifnum\testtwo=\the\currentpartyshortcount
  2421.            {\ifnoandneeded
  2422.              \else\unskip\ and%
  2423.             \fi
  2424.            }%
  2425.            \global\advance\testtwo by1
  2426.           \fi
  2427.          }%
  2428.       \fi
  2429.     \ifx\partyaddress\testand \global\noandneededtrue
  2430.      \else\global\noandneededfalse
  2431.     \fi
  2432.     \ifx\partyaddress\empty\let\partyaddress\noaddr\fi%fudge
  2433.     \unskip\ \partyname\ \partyaddress%
  2434.    \endgroup
  2435.    \ifnum\testone<\the\currentpartyfullcount%
  2436.   \repeat%
  2437.   #2}
  2438.  
  2439. % A number of these are not yet used
  2440. % (and may never be used)
  2441.  
  2442. \def\getpls{\getparties{\plaintiffs}{\pltext}}
  2443. \def\getdefs{\getparties{\defendants}{\dftext}}
  2444. \def\gettps{\getparties{\thirdparties}{\tptext}}
  2445. \def\getfps{\getparties{\fourthparties}{\fptext}}
  2446. %\def\getaps{\getparties{\appellants}{\aptext}}
  2447. %\def\getresp{\getparties{\respondents}{\rptext}}
  2448. %\def\getapplics{\getparties{\applicants}{\altext}}
  2449.  
  2450. \newcount\plshortcount
  2451. \newcount\dfshortcount
  2452. \newcount\tpshortcount
  2453. \newcount\fpshortcount
  2454. %\newcount\apshortcount
  2455. %\newcount\rpshortcount
  2456. %\newcount\alshortcount
  2457.  
  2458. \newcount\plaintiffsshortcount
  2459. \newcount\defendantsshortcount
  2460. \newcount\thirdpartiesshortcount
  2461. \newcount\fourthpartiesshortcount
  2462. %\newcount\appellantsshortcount
  2463. %\newcount\respondentsshortcount
  2464. %\newcount\applicantsshortcount
  2465.  
  2466. \newcount\plaintiffsfullcount
  2467. \newcount\defendantsfullcount
  2468. \newcount\thirdpartiesfullcount
  2469. \newcount\fourthpartiesfullcount
  2470. %\newcount\appellantsfullcount
  2471. %\newcount\respondentsfullcount
  2472. %\newcount\applicantsfullcount
  2473.  
  2474. \newdimen\plaintiffswidth
  2475. \newdimen\defendantswidth
  2476. \newdimen\thirdpartieswidth
  2477. \newdimen\fourthpartieswidth
  2478. %\newdimen\appellantswidth
  2479. %\newdimen\respondentswidth
  2480. %\newdimen\applicantswidth
  2481.  
  2482. \def\unsetallparties{%
  2483.  \plaintifffalse
  2484.  \defendantfalse
  2485.  \thirdpartyfalse
  2486.  \fourthpartyfalse
  2487.  }
  2488.  
  2489. \def\plaintiff#1{\unsetallparties\plaintifftrue
  2490.  \party{\plaintiffs}{#1}}
  2491. \def\defendant#1{\unsetallparties\defendanttrue
  2492.  \party{\defendants}{#1}}
  2493. \def\thirdparty#1{\unsetallparties\thirdpartytrue
  2494.  \party{\thirdparties}{#1}}            
  2495. \def\fourthparty#1{\unsetallparties\fourthpartytrue
  2496.  \party{\fourthparties}{#1}}
  2497. %\def\appellant#1{\unsetallparties\appellanttrue
  2498. % \party{\appellants}{#1}}
  2499. %\def\respondent#1{\unsetallparties\respondenttrue
  2500. % \party{\respondents}{#1}}
  2501. %\def\applicant#1{\unsetallparties\applicanttrue
  2502. % \party{\applicants}{#1}}
  2503.  
  2504. \def\listpls{\listparties{\plaintiffs}}
  2505. \def\listdfs{\listparties{\defendants}}
  2506. \def\listtps{\listparties{\thirdparties}}
  2507. \def\listfps{\listparties{\fourthparties}}
  2508. %\def\listaps{\listparties{\appellants}}
  2509. %\def\listrps{\listparties{\respondents}}
  2510. %\def\listapplics{\listparties{\applicants}}
  2511.  
  2512. \def\slistpls{\slistparties{\plaintiffs}}
  2513. \def\slistdfs{\slistparties{\defendants}}
  2514. \def\slisttps{\slistparties{\thirdparties}}
  2515. \def\slistfps{\slistparties{\fourthparties}}
  2516. %\def\slistaps{\slistparties{\appellants}}
  2517. %\def\slistrps{\slistparties{\respondents}}
  2518. %\def\slistapplics{\slistparties{\applicants}}
  2519.  
  2520. \gdef\pluraltext{%
  2521.     \gdef\addressis{addresses are}%
  2522.     \gdef\seek{seek}%
  2523.     \gdef\wants{claim}%
  2524.     \gdef\respectively{respectively}%
  2525.     \gdef\them{them}%
  2526.     \gdef\do{do}%
  2527.     }
  2528.  
  2529. \gdef\singulartext{%
  2530.     \gdef\addressis{address is}%
  2531.     \gdef\seek{seeks}%
  2532.     \gdef\wants{claims}%
  2533.     \gdef\respectively{\unskip}%
  2534.     \gdef\do{does}%
  2535.     \gdef\them{him}%
  2536.     }
  2537.  
  2538. \gdef\pltext{%
  2539.   \ifnum\plaintiffsfullcount>1%
  2540.     \gdef\plaintfs{\Plaintiffs}%
  2541.     \pluraltext
  2542.   \else%
  2543.     \ifpluralplaintiff%
  2544.     \gdef\plaintfs{\Plaintiffs}%
  2545.     \pluraltext
  2546.   \else%
  2547.     \gdef\plaintfs{\Plaintiff}%
  2548.     \singulartext
  2549.   \fi\fi}
  2550.  
  2551. \gdef\dftext{%
  2552.   \ifnum\defendantsfullcount>1%
  2553.     \gdef\dfdants{\Defendants}%
  2554.     \pluraltext
  2555.   \else%
  2556.     \ifpluraldefendant%
  2557.     \pluraltext
  2558.   \else%
  2559.     \gdef\dfdants{\Defendant}%
  2560.     \singulartext
  2561.     \gdef\them{\iffemaledef her\else him\fi}%
  2562.   \fi\fi}%
  2563.  
  2564. \gdef\tptext{%
  2565.   \ifnum\thirdpartiesfullcount>1%
  2566.     \gdef\thirdparts{Third Parties}%
  2567.     \pluraltext
  2568.   \else%
  2569.     \ifpluralthirdparty%
  2570.     \gdef\thirdparts{Third Parties}%
  2571.     \pluraltext
  2572.   \else%
  2573.     \gdef\thirdparts{Third Party}%
  2574.     \singulartext
  2575.   \fi\fi}
  2576.  
  2577. \gdef\fptext{%
  2578.   \ifnum\fourthpartiesfullcount>1%
  2579.     \gdef\fourthparts{Fourth Parties}%
  2580.     \pluraltext
  2581.   \else%
  2582.     \ifpluralfourthparty%
  2583.     \gdef\fourthparts{Fourth Parties}%
  2584.     \pluraltext
  2585.   \else%
  2586.     \gdef\fourthparts{Fourth Party}%
  2587.     \singulartext
  2588.   \fi\fi}
  2589.  
  2590. %\gdef\aptext{%
  2591. %  \ifnum\appellantsfullcount>1%
  2592. %    \gdef\plaintfs{Appellants}%
  2593. %    \pluraltext
  2594. %  \else%
  2595. %    \ifpluralappellant%
  2596. %    \gdef\plaintfs{Appellants}%
  2597. %    \pluraltext
  2598. %  \else%
  2599. %    \gdef\plaintfs{Appellant}%
  2600. %    \gdef\addressis{address is}%
  2601. %    \pluraltext
  2602. %  \fi\fi}
  2603. %%
  2604. %\gdef\rptext{%
  2605. %  \ifnum\respondentsfullcount>1%
  2606. %    \gdef\dfdants{Respondents}%
  2607. %    \pluraltext
  2608. %  \else%
  2609. %    \ifpluralrespondent%
  2610. %    \gdef\dfdants{Respondents}%
  2611. %    \pluraltext
  2612. %  \else%
  2613. %    \gdef\dfdants{Respondent}%
  2614. %    \singulartext
  2615. %  \fi\fi}%
  2616. %%
  2617. %\gdef\altext{%
  2618. %  \ifnum\applicantsfullcount>1%
  2619. %    \gdef\plaintfs{Applicants}%
  2620. %    \pluraltext
  2621. %  \else%
  2622. %    \ifpluralappellant%
  2623. %    \gdef\plaintfs{Applicants}%
  2624. %    \pluraltext
  2625. %  \else%
  2626. %    \gdef\plaintfs{Applicant}%
  2627. %    \singulartext
  2628. %  \fi\fi}
  2629. %%
  2630. % Phew. I reckon those need amending...
  2631.  
  2632. % This is one macro that will soon go, being replaced by
  2633. % \pleading and \spleading
  2634.  
  2635. \def\topofpleading#1#2{% doctype & ct
  2636.   \reset
  2637.   \storeparindent=\the\parindent
  2638.   \global\parindent=0pt
  2639.   \def\doctype{#1}
  2640.   \ct=#2
  2641.   \pleadingtrue
  2642.   \clientpltrue
  2643.   \gettitle
  2644.   \def\backsheet{\enddoc\bsdft}
  2645.   \heading
  2646.   \parties}
  2647.  
  2648. % So will this. It will be \let equal to \pleading
  2649.  
  2650. \def\generic#1{%
  2651.   \reset
  2652.   \def\doctype{\vtop{\centertext{#1}}}
  2653.   \heading
  2654.   \ifnoparties\else\parties\fi
  2655.   \centertext{#1}
  2656.   \medskip}
  2657.  
  2658. \def\am@nd{%
  2659.   \ifnum\amendcount>2{\uuul RE-}\fi
  2660.   \ifnum\amendcount>1{\uul RE-}\fi
  2661.   \ifnum\amendcount>0{\ul AMENDED }\fi
  2662.   }
  2663.  
  2664. \def\pleading#1{% doctype
  2665.   \storeparindent=\the\parindent
  2666.   \global\parindent=0pt
  2667.   \draft{\am@nd#1}
  2668.   \pleadingtrue
  2669.   \gettitle
  2670.   \heading
  2671.   \parties
  2672.   \ifdraft
  2673.    \def\signoff{\endofpleading\settled}%
  2674.   \else\let\signoff\endofpleading\fi
  2675.   \medbreak
  2676.   \leavevmode
  2677.   \centertext{\am@nd#1}%
  2678.   \nobreak
  2679.   \amendnote}
  2680.  
  2681. \def\spleading#1{% doctype
  2682.   \storeparindent=\the\parindent
  2683.   \global\parindent=0pt
  2684.   \draft{\am@nd#1}
  2685.   \pleadingtrue
  2686.   \gettitle
  2687.   \heading
  2688.   \sparties
  2689.   \ifdraft
  2690.    \def\signoff{\endofpleading\settled}%
  2691.   \else\let\signoff\endofpleading\fi
  2692.   \medbreak
  2693.   \centertext{\am@nd#1}%
  2694.   \nobreak
  2695.   \amendnote}
  2696.  
  2697. \def\gettitle{% This needs a lot of work
  2698.   \pltext\dftext\tptext % added to deal with ops on their own
  2699.   \getbstitlewidth
  2700.   \gdef\title{%
  2701.    \global\maxp@rtywidth=\the\bstitlewidth
  2702.     \centerline{\court}\cr
  2703.     \scaps
  2704.     \division\cr
  2705.     \regis\cr  
  2706.     \reference\cr
  2707.     \noalign{\bigskip}%
  2708.     \rm
  2709.     \centertext{\inthematter}\cr
  2710.     \noalign{\medskip}%
  2711.     \slistpls\cr
  2712.     \hfill\it\plaintfs\cr
  2713.     \against\cr
  2714.     \strut\cr
  2715.     \slistdfs\cr
  2716.     \hfill\it\dfdants\cr}%
  2717.    \global\maxp@rtywidth=\the\maxpartywidth}
  2718.  
  2719. \def\headingskip{\vskip-\lastskip\smallskip}
  2720.  
  2721. \gdef\heading{% Can this be broken down further?
  2722.   \vbox{\baselineskip=15pt
  2723.    \line{\court\hfil\reference}%
  2724.    \headingskip 
  2725.    \scaps % Turn on caps and smallcaps
  2726.     \apcourt
  2727.     \headingskip
  2728.     \division
  2729.     \headingskip
  2730.     \regis
  2731.     \headingskip
  2732.     \subdivision
  2733.     \headingskip
  2734.     \judgename
  2735.     \headingskip
  2736.     \rm % Back to roman
  2737.     \Writissued
  2738.     \headingskip
  2739.     \inthematter
  2740.     }% end of vbox
  2741.   \medskip}
  2742.  
  2743. \def\parties{%
  2744.   \capacitytrue
  2745.   \pltext% set up the alternative text for `his', `their', etc.
  2746.   \dftext
  2747.   \tptext
  2748.   {\noindent\leftline{BETWEEN\raise.15ex\hbox{---}}
  2749.   \bigskip
  2750.   % The next few lines box up the parties.
  2751.   \centerline{\hbox{\vtop{\baselineskip=15pt %Baselineskip in parties
  2752.     \halign{\hfill ##\hfill\cr
  2753.     \listpls\cr
  2754.   \relax\hidewidth\rightline{\hfil\it
  2755.     \ifintendedaction Intended\ \fi\plaintfs}
  2756.   \hidewidth\relax\cr
  2757.     \hfill \against\hfill\cr
  2758.     \strut\cr
  2759.   \listdfs\cr
  2760.   \relax\hidewidth\rightline{\it 
  2761.     \ifintendedaction Intended\ \fi\dfdants}
  2762.   \hidewidth\relax\cr
  2763.   \ifthirdparty
  2764.     \hfill \against\hfill\cr
  2765.     \strut\cr
  2766.   \listtps\cr
  2767.   \relax\hidewidth\rightline{\it 
  2768.     \ifintendedaction Intended\ \fi\thirdparts}
  2769.     \hidewidth\relax\cr\fi  
  2770.   }}}}}%
  2771.   \twelvepoint\bigskip
  2772.   \capacityfalse}
  2773.  
  2774. % Short version of parties for affy's, etc.
  2775.  
  2776. \def\sparties{%
  2777.   \capacitytrue
  2778.   \pltext % set up the alternative text for `his', `their', etc.
  2779.   \dftext
  2780.   \tptext
  2781.   {\noindent\leftline{BETWEEN\raise.15ex\hbox{---}}
  2782.   % The next few lines box up the parties.
  2783.   \centerline{\hbox{\vtop{\baselineskip=15pt
  2784.     \halign{\hfill ##\hfill\cr
  2785.     \slistpls\cr
  2786.   \relax\hidewidth\rightline{\hfill\it 
  2787.     \ifintendedaction Intended\ \fi\plaintfs}
  2788.     \hidewidth\relax\cr
  2789.     \hfill \against\hfill\cr
  2790.     \strut\cr
  2791.     \slistdfs\cr
  2792.    \relax\hidewidth\rightline{\hfill\it 
  2793.     \ifintendedaction Intended\ \fi\dfdants}
  2794.     \hidewidth\relax\cr
  2795.   \ifthirdparty
  2796.     \hfill \against \hfill\cr
  2797.     \strut\cr
  2798.     \slisttps\cr
  2799.   \relax\hidewidth\rightline{\hfill\it 
  2800.     \ifintendedaction Intended\ \fi\thirdparts}
  2801.     \hidewidth\relax\cr\fi}}%
  2802.   }}}%
  2803.   \bigskip
  2804.   \capacityfalse}%
  2805.  
  2806. \def\listparties#1{% #1=partylist (eg \plaintiffs)
  2807.   \converttokens{#1}%
  2808.   \testone=0\def\\##1{\relax##1\cr}%
  2809.   \tabskip=0pt
  2810.   \vtop{\hsize=\the\maxp@rtywidth
  2811.     \hyphenpenalty=10000\tolerance=2750
  2812.     \ifnum\currentpartyfullcount>1
  2813.       \halign{\global\advance\testone by1
  2814.       \hfil
  2815.       \llap{(\the\testone)\quad}
  2816.       \vtop{%
  2817.         \hsize=\the\currentpartywidth
  2818.         \hangafter1\hangindent\the\partyhang
  2819.         \strut##\strut}% end of \vtop
  2820.       \hfil\cr#1}% end of \halign
  2821.      \else
  2822.       \ifnum\currentpartyfullcount=1
  2823.       \partyno=1
  2824.       \select\partyno \of#1 \to\partyname
  2825.       \centertext{\partyname}%
  2826.      \fi\fi}}
  2827.  
  2828. \def\slistparties#1{% #1=\plaintiffs
  2829.   \converttokens{#1}%
  2830.   \partyno=1\def\\##1{\relax##1\cr}%
  2831.   \tabskip=0pt
  2832.   \select\partyno \of#1 \to\partyname
  2833.   \vtop{\hsize=\the\maxp@rtywidth
  2834.    \hyphenpenalty=10000\tolerance=2750
  2835.    \ifnum\currentpartyfullcount>2
  2836.      \centertext{\partyname{ \it \&~Ors.\/}}%
  2837.    \else\ifnum\currentpartyfullcount=2
  2838.      \centertext{\partyname{ \it \&~Anor.\/}}%
  2839.    \else\ifnum\currentpartyfullcount=1
  2840.      \centertext{\partyname}%
  2841.    \fi\fi\fi}}
  2842.  
  2843. % This is a default definition.
  2844. \long\def\bottomofpleading#1{%#1=text
  2845.   \def\addressfile{solicitors}
  2846.   \getaddress
  2847.   {\def\cr{ of \def\cr{, }}%
  2848.   \medskip
  2849.   #1}%
  2850.   \global\parindent=\the\storeparindent}
  2851.  
  2852. \def\inthematter{%
  2853.   \ifx\matters\empty
  2854.   \else\testone=0\def\\##1{\relax\global\advance\testone by1%
  2855.    \def\and{\ifnum\testone<2{}%
  2856.   \else{And\ }\fi}% Now do the work
  2857.   {\scaps \and}##1\strut\cr
  2858.   \ifnum\testone<\the\mattercount \noalign{\smallskip}\fi}%
  2859.   \halign{%
  2860.     \vtop{\twelvebase=15pt\twelvepoint
  2861.     \hangafter1 \hangindent\clindent ##\strut}\hfil\cr
  2862.     \matters\crcr}%
  2863.   \fi}
  2864.  
  2865. % Now some other pleading stuff, esp. amendments
  2866.  
  2867. \def\served#1{\getservicedate{#1}{\dateofservice}}
  2868. \def\reserved#1{\getservicedate{#1}{\dateofreservice}}
  2869. \def\rereserved#1{\getservicedate{#1}{\dateofrereservice}}
  2870. \def\rerereserved#1{\getservicedate{#1}{\dateofrerereservice}}
  2871.  
  2872. \def\writissued#1{%
  2873.   \getservicedate{#1}{\datewritissued}%
  2874.   \gdef\Writissued{Writ issued the \nodate}%
  2875.   }
  2876.  
  2877. \def\getservicedate#1#2{{%
  2878.    \def\sserved##1/##2/##3roger{%
  2879.      \def\day{##1}%
  2880.      \def\month{##2}%
  2881.      \def\year{\ifnum##3<100 19##3\else##3\fi}%
  2882.      \expandafter\xdef\csname\expandafter\gobble\string#2\endcsname{\longtoday}%
  2883.      }%
  2884.    \sserved#1roger
  2885.    }}
  2886.  
  2887. \newif\ifamendtext\amendtexttrue
  2888. \def\setamendcount#1{\global\amendcount=#1}
  2889.  
  2890. \newcount\amendcount
  2891. \newcount\aamct \aamct=0
  2892.  
  2893. \gdef\amended{%
  2894.   \enddoc
  2895.   \setamendcount{1}%
  2896.   \ifamendtext\amendstuff\fi}
  2897.  
  2898. \gdef\reamended{%
  2899.   \enddoc
  2900.   \setamendcount{2}
  2901.   \ifamendtext\amendstuff\fi}
  2902.  
  2903. \gdef\rereamended{%
  2904.   \setamendcount{3}%
  2905.   \ifamendtext\amendstuff\fi}
  2906.  
  2907. \def\amendstuff{%This overlong macro deals with amendment formal parts
  2908.   \gdef\amendnote{%
  2909.      \ifnum\amendcount<2% First amendment
  2910.        \tcl{\scaps Note:} Text inserted by this amendment to this 
  2911.        pleading is shown underlined, {\ul thus}; text deleted by 
  2912.        this amendment is shown crossed-out, {\xo thus}.
  2913.      \else % Second and subsequent amendments
  2914.        \tcl{\scaps Note 1:} Text inserted by the first amendment 
  2915.        is shown underlined, {\ul thus}; text deleted by the 
  2916.        first amendment is shown crossed-out, {\xo thus};
  2917.        \par
  2918.        \tcl{\scaps Note 2:} Text inserted by the second amendment 
  2919.        is shown underlined twice, {\uul thus}; text deleted by the 
  2920.        second amendment is shown crossed-out twice, {\xxo thus}.
  2921.      \fi
  2922.      \par
  2923.      \ifnum\amendcount=3% re-re-amendment
  2924.        \tcl{\scaps Note 3:} Text inserted by the third amendment 
  2925.        is shown underlined thrice, {\uuul thus}; text deleted by 
  2926.        the third amendment is shown crossed-out thrice, {\xxxo thus}.
  2927.      \fi
  2928.      }%
  2929.     \ifnum\ct=1\ccendofpleading\else\hcendofpleading\fi
  2930.   \global\amendtextfalse
  2931.   }
  2932.  
  2933. \def\hcendofpleading{% End of pleading for High Court
  2934.     \gdef\endofpleading{%
  2935.       \signature      
  2936.       {\ul \signature}
  2937.       \ifnum\amendcount>1{\uul \signature}\fi
  2938.       \ifnum\amendcount>2{\uuul \signature}\fi
  2939.       \bottomofpleading{%
  2940.         Served the \ifx\dateofservice\empty{\nodate}%
  2941.          \else{\dateofservice}\fi
  2942.       \unskip
  2943.       \ifnum\amendcount=1{\ul\ and }\fi% Amend
  2944.       \ifnum\amendcount>1{\ignorespaces\ul\unskip, }\fi
  2945.       {\ul re-served the \ifx\dateofreservice\empty{\nodate}%
  2946.          \else{\dateofreservice}\fi\unskip}
  2947.       \ifnum\amendcount=2{\ul\ and }\fi% Reamend
  2948.       \ifnum\amendcount>2{\ignorespaces\ul\unskip, }\fi
  2949.       \ifnum\amendcount>1% ie \amendcount is 2 or more
  2950.          {\uul re-re-served the 
  2951.            \ifx\dateofrereservice\empty{\nodate}%
  2952.            \else{\dateofrereservice}\fi\unskip}
  2953.            \fi
  2954.       \ifnum\amendcount=3{\ul\ and }\fi% Re-re-amend
  2955.         \ifnum\amendcount>2% ie \amendcount is 3 or more
  2956.            {\uuul re-re-re-served the 
  2957.             \ifx\dateofrerereservice\empty{\nodate}%
  2958.              \else{\dateofrerereservice}\fi}
  2959.          \fi
  2960.        by \ignorespaces\sols \solicitors\ for the\forwhom\par
  2961.          }%
  2962.      }%
  2963.     }
  2964.  
  2965. \def\ccendofpleading{% End of pleading for county court
  2966.     \gdef\endofpleading{%
  2967.       \medskip
  2968.       Dated the \ifx\dateofservice\empty{\nodate}%
  2969.        \else{\dateofservice}\fi
  2970.       \signature      
  2971.       {\ul Dated the \ifx\dateofreservice\empty{\nodate}%
  2972.        \else{\dateofreservice}\fi\unskip}
  2973.       {\ul \signature}
  2974.       \ifnum\amendcount>1
  2975.         {\uul Dated the \ifx\dateofrereservice\empty{\nodate}%
  2976.         \else{\dateofrereservice}\fi\unskip}
  2977.         {\uul \signature}
  2978.       \fi
  2979.       \ifnum\amendcount>2% ie \amendcount is 3 or more
  2980.         {\uuul Dated the \ifx\dateofrerereservice\empty{\nodate}%
  2981.         \else{\dateofrerereservice}\fi}
  2982.         {\uuul\signature}
  2983.       \fi
  2984.       \bottomofpleading{%
  2985.         \rightline{\vtop{\hsize=.6\hsize
  2986.           The \forwhom's \solicitors\ are \sols
  2987.           where they will accept service of proceedings 
  2988.           on behalf of the \forwhom.}}
  2989.         \bigskip
  2990.         \leftline{\vtop{\hsize=.6\hsize
  2991.           To the District Judge of the \courtname\ 
  2992.           COUNTY COURT and to the \notforwhom.}}
  2993.         }%
  2994.      }%
  2995.     }
  2996.  
  2997. % Clause numbering for use inside amendments
  2998.  
  2999. \def\acl{\clauselevel=1
  3000.  \advance\recno by1 \xcl{\hss\the\clno\char\the\recno.\enspace}}
  3001.  
  3002. \def\aacl{\clauselevel=1
  3003.  \advance\recno by1 \xcl{\hss\the\clno\char\the\recno\char
  3004.   \the\recno.\enspace}}
  3005.  
  3006. \def\aaacl{\clauselevel=1
  3007.  \advance\recno by1 \xcl{\hss\the\clno\char\the\recno\char\the\recno%
  3008.     \char\the\recno.\enspace}}
  3009.  
  3010. \def\ascl{\clauselevel=2
  3011.  \advance\recno by1 \xcl{\hss(\the\sclno\char\the\recno)\enspace}}
  3012.  
  3013. \def\aascl{\clauselevel=2
  3014.  \advance\recno by1 \xcl{\hss(\the\sclno\char\the\recno%
  3015.     \char\the\recno)\enspace}}
  3016.  
  3017. \def\aaascl{\clauselevel=2
  3018.  \advance\recno by1 \xcl{\hss(\the\sclno\char\the\recno\char\the\recno%
  3019.     \char\the\recno)\enspace}}
  3020.  
  3021. \let\dateofservice\empty
  3022. \let\dateofreservice\empty
  3023. \let\dateofrereservice\empty
  3024. \let\dateofrerereservice\empty
  3025. \let\datewritissued\empty
  3026.  
  3027. \def\resetpleadingdefaults{%
  3028.    \ifnum\ct=1
  3029.      \def\endofpleading{%
  3030.       \medskip
  3031.       Dated this \nodate\par\signature
  3032.       \bottomofpleading{%
  3033.         \rightline{\vtop{\hsize=.6\hsize
  3034.           The \forwhom's \solicitors\ are \sols 
  3035.           where they will accept service of proceedings 
  3036.           on behalf of the \forwhom.}}
  3037.         \bigskip
  3038.         \leftline{\vtop{\hsize=.6\hsize
  3039.           To the District Judge of the \courtname\ 
  3040.           COUNTY COURT and to the \notforwhom.}}
  3041.         }}%
  3042.    \else
  3043.     \def\endofpleading{%
  3044.       \signature
  3045.       \bottomofpleading{%
  3046.         Served the \nodate by \ignorespaces\sols \solicitors\ 
  3047.         for the \forwhom}}
  3048.    \fi
  3049.    \gdef\amendnote{}% Reset it.
  3050.    \let\dateofservice\empty
  3051.    \let\dateofreservice\empty
  3052.    \let\dateofrereservice\empty
  3053.    \let\datewritissued\empty
  3054.    \setamendcount{0}%
  3055.    \global\maxp@rtywidth=\the\maxpartywidth}
  3056.  
  3057. % These may change. They set up names.
  3058.  
  3059. \gdef\Plaintiffs{\ifappeal Appellants\else\ifapplication Applicants%
  3060.   \else Plaintiffs\fi\fi}
  3061. \gdef\Plaintiff{\ifappeal Appellant\else\ifapplication Applicant%
  3062.   \else Plaintiff\fi\fi}
  3063. \gdef\Defendants{\ifappeal Respondents\else\ifapplication Respondents%
  3064.   \else Defendants\fi\fi}
  3065. \gdef\Defendant{\ifappeal Respondent\else\ifapplication Respondent%
  3066.   \else Defendant\fi\fi}
  3067. \gdef\Thirdparty{Third Party}
  3068. \gdef\Thirdparties{Third Parties}
  3069.  
  3070. % examples of use
  3071.  
  3072. % This assumes that \clientpl has already been set true or false
  3073. \def\arrangement{%
  3074.  \def\endofpleading{}
  3075.   \spleading{ARRANGEMENT}}
  3076.  
  3077. \def\soc{%
  3078.   \ifx\Writissued\empty\def\Writissued{Writ issued the \nodate}\fi
  3079.   \clientpltrue
  3080.   \pleading{STATEMENT OF CLAIM}}
  3081.  
  3082. \def\defence{%
  3083.  \let\Writissued\empty
  3084.  \clientplfalse
  3085.  \pleading{DEFENCE}}
  3086.  
  3087. \def\dacc{%
  3088.  \gdef\counterclaim{%
  3089.    \vskip\the\clskip
  3090.    \centerline{COUNTERCLAIM}
  3091.    \nobreak}
  3092.  \let\Writissued\empty
  3093.  \clientplfalse
  3094.  \pleading{DEFENCE AND COUNTERCLAIM}
  3095.  \smallskip
  3096.  \centerline{DEFENCE}
  3097.  \nobreak}
  3098.  
  3099. \def\counterclaim{% Counterclaim on its own
  3100.  \let\Writissued\empty
  3101.  \clientplfalse
  3102.  \pleading{COUNTERCLAIM}}
  3103.  
  3104. \def\reply{% Reply on its own
  3105.  \let\Writissued\empty
  3106.  \clientpltrue
  3107.  \pleading{REPLY}}
  3108.  
  3109. \def\rdcc{% Reply and Defence to Counterclaim
  3110.  \let\Writissued\empty
  3111.  \clientpltrue
  3112.  \pleading{REPLY AND DEFENCE TO COUNTERCLAIM}}
  3113.  
  3114. % County Court. Note: These macros do not yet reproduce
  3115. % all (or indeed any) of the batty prescribed forms, although
  3116. % it would not be difficult to achieve this.
  3117. % Most macros are the same as the HC macros
  3118.  
  3119. \def\poc{%
  3120.  \let\Writissued\empty
  3121.  \clientpltrue
  3122.  \pleading{PARTICULARS OF CLAIM}}
  3123.  
  3124. % The Affidavit macros. These are fairly complicated
  3125. % First, some general bits and pieces
  3126.  
  3127. \newtoks\shortinitials \shortinitials={}
  3128. \newtoks\tempinitials \tempinitials={}
  3129. \newtoks\surname \surname={} 
  3130. \newif\ifsomeletters \somelettersfalse
  3131. \newif\ifspace \spacefalse
  3132. \newif \ifpunct
  3133. \newtoks\firstletter \firstletter={}
  3134. \newif\ifmac \macfalse
  3135. \newtoks\longinitials \longinitials={}
  3136.  
  3137. \newcount\lettercount
  3138. \newcount\surnamecount
  3139. \newcount\front
  3140.  
  3141. \def\affyno#1{%
  3142.  \def\affno{\addsuffix{#1}}}
  3143. \affyno{1}% set 1st as default
  3144.  
  3145. % Now some stuff to extract initials from fullnames
  3146.  
  3147. \def\itsaspace{% 
  3148. \dbhelp{It is a space}%
  3149.   \ifsomeletters% 
  3150.     \edef\tin{\the\shortinitials\the\firstletter.}%
  3151.     \shortinitials=\expandafter{\tin}%
  3152.     \somelettersfalse\fi%
  3153.   \lettercount=0\surnamecount=0\relax\unskip}
  3154.  
  3155. \def\itsaletter#1{%
  3156. \dbhelp{It is a letter-"#1"}%
  3157.   \advance\lettercount by1% #1 is a letter
  3158.   \advance\surnamecount by1\relax%
  3159.   \ifnum\lettercount=1 \firstletter={#1}
  3160.    \someletterstrue\fi
  3161.   \ifnum\surnamecount=1\surname=\expandafter{#1}%
  3162.     \tempinitials=\expandafter{#1}%
  3163.   \else\ifnum\surnamecount>1%
  3164.     \tempinitials=\expandafter{\the\tempinitials#1}
  3165.     \maccheck{#1}%
  3166.   \fi\fi}
  3167.  
  3168. \def\maccheck#1{%
  3169. \dbhelp{Doing MacCheck}%
  3170.   \ta={Mc}
  3171.   \edef\tone{\the\ta}%
  3172.   \edef\ttwo{\the\tempinitials}%
  3173.   \ifx\tone\ttwo
  3174.     \mactrue
  3175.     \surname=\expandafter{\the\tempinitials}%
  3176.   \else\ifpunct\punctfalse\surname=\expandafter{\the\surname#1}%
  3177.    \firstletter=\expandafter{\the\firstletter#1}%
  3178.   \else\ifmac\macfalse\surname=\expandafter{\the\surname#1}%
  3179.     \firstletter=\expandafter{\the\tempinitials}%
  3180.   \else\surname=\expandafter{\the\surname\lowercase{#1}}%
  3181.   \fi\fi\fi}
  3182.  
  3183. \def\itspunctuation#1{%
  3184. \dbhelp{It is punctuation-"#1"}%
  3185. %\def\temppunct#1{\if#1\noexpand~-\else#1\fi}%
  3186.   \somelettersfalse
  3187.   \edef\tin{\the\tempinitials#1}
  3188.   \tempinitials=\expandafter{\tin}%
  3189.   \surname=\expandafter{\the\surname#1}%
  3190.   \someletterstrue
  3191.   \if#1\space\firstletter=\expandafter{\the\firstletter.}\else
  3192.    \firstletter=\expandafter{\the\firstletter#1}\fi
  3193.   \advance\surnamecount by1\puncttrue\relax}
  3194.  
  3195. \gdef\length#1{\lettercount=0\surnamecount=0
  3196. \unskip\ignorespaces\getlength#1!}
  3197.  
  3198. \gdef\getlength#1{%
  3199. \dbhelp{Character="#1"}
  3200.   \unskip\ignorespaces
  3201.   \if#1!
  3202.     \let\next=\relax
  3203.     \edef\tin{\the\shortinitials\the\firstletter.}%
  3204.     \longinitials=\expandafter{\tin}%
  3205.   \else% ie if not end of name
  3206.     \edef\fullname{\fullname#1}%
  3207.     \dbhelp{Fullname="\fullname"}%
  3208.     \ifcat\noexpand#1\noexpand~  \itsaspace\fi% 
  3209.     \if#1\noexpand_\itspunctuation{ }\else
  3210.      \ifcat#1-\itspunctuation{#1}\fi\fi%
  3211.     \ifcat#1a \itsaletter{#1}\fi%
  3212.     \let\next=\getlength%
  3213.  \fi% it is an exclamation mark
  3214.  \unskip\next}
  3215.  
  3216. \gdef\deponent{%
  3217.  \enddoc \endedtrue
  3218.  \def\clearexno{\exno=0 \front=0}%Use \setexno{n} to reset to other number.
  3219.  \shortinitials={}%reset the lot
  3220.  \surname={}
  3221.  \longinitials={}
  3222.   \def\of##1{\def\hisaddr{##1}%
  3223.   \ifx\hisaddr\empty\def\hisaddr{[{\it address\/}]}\fi}%
  3224.   \def\occupation##1{\def\hisoccupation{##1}%
  3225.   \ifx\hisoccupation\empty
  3226.     \def\hisoccupation{[{\it occupation\/}]}\fi
  3227.     \def\comma{, }}%
  3228.   \of{}\occupation{}% set up the defaults
  3229.   \def\nooccupation{\def\hisoccupation{}%
  3230.     \def\comma{}}%
  3231.   \catcode`\ =\active % Make spaces active ftb.
  3232.   \global\catcode`\_=\other % Make underlines into letters
  3233.   \let\tempt=~ \catcode`\~=\other \let\tilde=~ % check tilde
  3234.   \let\tempb=\blank \let\blank=\space
  3235.   \whatsnext}
  3236.  
  3237. \def\whatsnext#1{%
  3238.   \ifx#1\noname
  3239.    \shortinitials={\blank}%
  3240.    \surname={\blank\blank}%
  3241.    \longinitials={\blank\blank}%
  3242.    \def\fullname{\noname}%
  3243.   \else
  3244.    \edef\fullname{}%
  3245.    \length{#1}%
  3246.   \fi
  3247.   \def\depsname{\hbox{\ignorespaces%
  3248.     \the\shortinitials\space\the\surname}}%
  3249.   \xdef\inits{\the\longinitials}%
  3250.   \catcode`\ =10% reset the catcodes
  3251.   \catcode`\~=\active
  3252.   \catcode`\_=8
  3253.   \let~=\tempt
  3254.   \let\blank=\tempb
  3255.   \gdef\deplname{I, \fullname, of \hisaddr\comma 
  3256.    \hisoccupation, make oath and say as follows---}}
  3257.  
  3258. \def\affidavit{\par% Note: This does NOT set \clientpl
  3259.   \clearexno
  3260.   \draft{AFFIDAVIT}% This has been moved
  3261.   \gettitle
  3262.   \pleadingtrue
  3263.   \endorsementtrue
  3264.   \ifdraft
  3265.    \def\signoff{\endofpleading\settled}%
  3266.   \else\let\signoff\endofpleading\fi
  3267.   \def\endofpleading{%
  3268.     \bottomofpleading{\sworn}}%
  3269.   \ifdraft\else
  3270.     \def\doextras{\getfrontsheets\let\doextras\empty}
  3271.   \fi
  3272.   \endorsement
  3273.   \heading
  3274.   \sparties
  3275.   \deplname % produces I, etc, make oath, etc.
  3276.   \medskip}
  3277.  
  3278. \def\endorsement{\tlap{\rightline{%
  3279.  \baselineskip=13pt\tenbf\getendorsement}\medskip}}
  3280.  
  3281. \def\bsendorsement{\tlap{\xcenterline{%
  3282.  \baselineskip=10pt\ninebf\getendorsement}}}
  3283.  
  3284. \def\getendorsement{%
  3285.  \setbox0\hbox{Deponent}\dimen1=.4\wd0
  3286.  \setbox0\hbox{Party\hskip\dimen1\forwhom}\dimen2=\wd0
  3287.  \setbox0\hbox{Deponent\hskip\dimen1\depsname}%
  3288.   \ifdim\wd0>\dimen2 \dimen2=\wd0\fi
  3289.  \setbox0\hbox{No.\ of Affidavit\hskip\dimen1\affno}%
  3290.   \ifdim\wd0 >\dimen2 \dimen2=\wd0\fi
  3291.  \setbox0\hbox{Date Sworn\hskip\dimen1\whensworn}%
  3292.   \ifdim\wd0>\dimen2 \dimen2=\wd0\fi
  3293.  \vbox{%
  3294.   \hbox to \dimen2{Party\dotfill\ignorespaces\forwhom}%
  3295.   \hbox to \dimen2{Deponent\dotfill\ignorespaces\depsname}
  3296.   \hbox to \dimen2{No.\ of Affidavit\dotfill%
  3297.     \hbox{\ignorespaces\affno}}%
  3298.   \hbox to \dimen2{Date Sworn\dotfill\whensworn}%
  3299.  }}
  3300.  
  3301. \def\frontsheet#1{% Produces frontsheets for exhibits
  3302.   \vfil\eject
  3303.   \endorsement
  3304.   \heading
  3305.   \sparties
  3306.   \pageno=0
  3307.   \nopagenumbers
  3308.   \inform{Frontsheet for Exhibit "\inits \number#1"}%
  3309.   \vtop{\raggedright\uchyph=0
  3310.    This is the Exhibit marked ``\inits\,\number#1'' referred to 
  3311.    in the Affidavit of \fullname\ sworn before me this \nodate
  3312.    \vskip1.5in
  3313.    \hskip.6\hsize\nobreak Solicitor }%
  3314.   \vfil\eject}
  3315.  
  3316. \def\getfrontsheets{%
  3317.  \ifnum\exno=0
  3318.  \else
  3319.   \loop
  3320.   \advance\front by1
  3321.   \frontsheet{\number\front}%
  3322.   \ifnum\exno>\number\front\repeat
  3323.  \fi}
  3324.  
  3325. % End of affidavit macros
  3326.  
  3327.  
  3328. % Originating Summons - long form
  3329.  
  3330. %\gdef\os{%
  3331. % \topofpleading{ORIGINATING SUMMONS}{0}
  3332. % \def\endos{\bottomofpleading{\endostext}}
  3333. % \ostext}
  3334. %
  3335. % Originating Summons - short form 
  3336. %
  3337. % Minutes of Order
  3338. %
  3339. %\def\minutes{%
  3340. %  \topofpleading{MINUTES OF ORDER}{0}
  3341. %  \medskip
  3342. %  \centerline{MINUTES OF ORDER}
  3343. %  \medskip
  3344. %   {\scaps This Application}, \etc\par
  3345. %   {\scaps And Upon Hearing}, \etc\par
  3346. %   {\scaps And Upon Reading}, \etc\par}
  3347. %
  3348. \def\order{%
  3349.   \topofpleading{ORDER}{0}
  3350.   \medskip
  3351.   \centerline{ORDER}
  3352.   \medskip}
  3353.  
  3354. % Other macros take the same form. (More will be added.)
  3355.  
  3356. \def\statementofclaim{%
  3357.   \topofpleading{\amend STATEMENT OF CLAIM}{0}
  3358.   \medskip
  3359.   \centerline{\amend STATEMENT OF CLAIM}
  3360.  \par\nobreak\medskip}
  3361.  
  3362. \def\endwrittext{%
  3363.     {\scaps This Writ} was issued by \ignorespaces\sols \solicitors\ for 
  3364.     the said \plaintfs\ whose \addressis\ as stated above}
  3365.  
  3366. \def\endgenwrit{% This can be removed
  3367. %  \signature
  3368.    \bottomofpleading{%
  3369.     {\scaps This Writ} was issued by \ignorespaces\sols \solicitors\ for 
  3370.     the said \plaintfs\ whose \addressis\ as stated above}}
  3371.  
  3372. \def\sjsummons{% O.14. It may be necessary to set \clientpl
  3373.   \origprocess{SUMMONS}{\summarytext}{}{}{\endsummarytext}%
  3374.   }
  3375.  
  3376. \def\spsummons{% O.86. It may be necessary to set \clientpl
  3377.  \topofpleading{SUMMONS}{0}
  3378.  \specifictext}
  3379.  
  3380. \def\summons{% This is an ordinary summons
  3381.   \topofpleading{SUMMONS}{0}
  3382.   \summonstext}
  3383.  
  3384. \def\endsummons{%
  3385.   {\scaps Dated} \nodate
  3386.   \bottomofpleading{This Summons was taken out by\sols \solicitors\ for 
  3387.   the above-named \forwhom\par
  3388.   \medskip
  3389.   To the \notforwhom\ and to \theirsols, of \theirsolsaddr, Solicitors 
  3390.   for the above-named \notforwhom.}}
  3391.  
  3392. \def\defenceandcounterclaim{%
  3393.   \reset
  3394.   \def\doctype{DEFENCE AND COUNTERCLAIM}
  3395.   \pleadingtrue
  3396.   \clientplfalse
  3397.   \draftparameters
  3398.   \gettitle
  3399.   \def\backsheet{\enddoc\bsdft}
  3400.   \heading
  3401.   \parties
  3402.   \centerline{\amend DEFENCE}
  3403.   \medskip}
  3404.  
  3405. \def\reply{%
  3406.   \reset
  3407.   \def\doctype{\amend REPLY}
  3408.   \clientpltrue
  3409.   \heading
  3410.   \ifnoparties\else\parties\fi
  3411.   \centerline{\amend REPLY}
  3412.   \medskip}
  3413.  
  3414. \def\replyanddefencetocounterclaim{%
  3415.   \reset
  3416.   \def\doctype{\vtop{\hsize=2.5in
  3417.     \centertext{\amend REPLY AND DEFENCE 
  3418.     TO COUNTERCLAIM}}}
  3419.   \clientpltrue
  3420.   \heading
  3421.   \ifnoparties\else\parties\fi
  3422.   \centerline{\amend REPLY AND DEFENCE TO COUNTERCLAIM}
  3423.   \medskip
  3424.   \centerline{\amend REPLY}
  3425.   \medskip}
  3426.  
  3427. \def\counterclaim{% This is for use in a Defence & Counterclaim
  3428.   \bigbreak\centerline{\amend COUNTERCLAIM}\nobreak\medskip}
  3429.  
  3430. \def\particulars{\clno=0
  3431.   \par\smallskip\centerline{PARTICULARS}\par}
  3432.  
  3433. \def\served{%
  3434.   \bottomofpleading{%
  3435.   Served the \nodate by \ignorespaces\sols \solicitors\ 
  3436.   for the \dfdants}}
  3437.  
  3438. % backsheet macros
  3439.  
  3440. % Misc
  3441.  
  3442. \edef\workdone{}
  3443. \newtoks\tempwd \tempwd={}
  3444. \newdimen\bstopincrease \bstopincrease=.5in
  3445. \newdimen\bsbotincrease \bsbotincrease=.5in
  3446. \def\chittitle{%
  3447.   \slistpls\cr
  3448.   \ v.\cr
  3449.   \slistdfs\cr}
  3450. \newdimen\storeparindent
  3451.  
  3452. \def\osinhtext{LET\ignorespaces\getdefs\ attend 
  3453.   before Master \nomonth at Chancery Chambers, 
  3454.   Room No.\noday, Royal Courts of Justice, Strand, 
  3455.   London, WC2A2LL on a day to be fixed on the hearing 
  3456.   by the \plaintfs \getpls for the following relief, 
  3457.   that is to say---\par
  3458. \medskip}
  3459.  
  3460. \def\endosinhtext{And let the \dfdants\ within [14 days] 
  3461.   after service of this summons on \them\ counting the 
  3462.   day of service, return the accompanying Acknowledgment 
  3463.   of Service to the appropriate Court Office.\par
  3464.   \nobreak\smallskip
  3465.   Dated the \nodate
  3466.  
  3467.   {\bf Note---}This summons may not be served later than 12 
  3468.   calendar months beginning with the above date unless 
  3469.   renewed by order of the Court.\par
  3470.   \medskip
  3471.   This summons was taken out by \ignorespaces\sols \solicitors\ 
  3472.   for the said \plaintfs\ whose \addressis\ as stated above
  3473.   \medskip
  3474.  
  3475.   {\bf Note---}If a defendant does not attend personally 
  3476.   or by his counsel or solicitor at the time and place 
  3477.   above-mentioned such order will be made as the Court may 
  3478.   think fit just and expedient.\par
  3479.   \medskip
  3480.   A defendant who is a personal representative must, 
  3481.   within 21 days after service of this summons on him, 
  3482.   counting the day of service, lodge with the court an 
  3483.   affidavit in answer, stating the particulars required by 
  3484.   Order 99, rule 5 of the Rules of the Supreme Court.\par
  3485.   \medskip
  3486.   \centerline{\bf IMPORTANT}\par\nobreak
  3487.   Directions for Acknowledgment of Service are given with the 
  3488.   accompanying form.\par
  3489.   }
  3490.  
  3491. \def\summarytext{% Spacing reduced to get it on one page
  3492.   \twelvebase=17pt\twelvepoint
  3493.   \smallskip
  3494.   {\scaps Let all parties} concerned attend \chambers\ 
  3495.   Royal Courts of Justice, Strand, London WC2A 2LL, 
  3496.   on  \phantom{[Mon]}day the \nodate\ at \noname on 
  3497.   the hearing of an application on the part of the \plaintfs\ 
  3498.   for the  relief claimed in the Statement of Claim
  3499.   \smallskip
  3500.   {\scaps Take Notice} that a party intending to oppose 
  3501.   this application or to apply for a stay of execution 
  3502.   should send to the opposite party or his Solicitor to 
  3503.   reach him not less than three days before the date 
  3504.   above mentioned a copy of any affidavit intended to be used.}
  3505.  
  3506. \def\endsummarytext{%
  3507.   {\scaps Dated} \nodate
  3508.   \smallskip
  3509.   This summons was taken out by \ignorespaces\sols \solicitors\ 
  3510.   for the \plaintfs.
  3511.   \smallskip
  3512.   TO \noname, of \noaddr, \solicitors\ for the \dfdants.\par}
  3513.  
  3514. \def\specifictext{%
  3515.   \smallskip
  3516.   {\scaps Let all parties} concerned attend before Master
  3517.   \if\mast\empty\blank\blank\else\mast\ \fi
  3518.   at the Chambers of the Judge, Room No.~\phantom{100}, Royal
  3519.   Courts of Justice, Strand, London WC2A 2LL, on
  3520.   \phantom{Wednesday} the \nodate\ at \phantom{12}~o'clock in
  3521.   the \phantom{after}noon on the hearing of an application on
  3522.   the part of the \plaintfs\ for the following relief---
  3523.  
  3524.   \cl An order pursuant to Order 86 of the Rules of the Supreme Court 
  3525.   for specific performance of the agreement in the Writ in this action 
  3526.   mentioned in the terms of the Minutes set out in the Schedule hereto
  3527.  
  3528.   \cl All necessary and further inquiries and accounts
  3529.  
  3530.   \cl In the alternative Directions as to the pleading in and further 
  3531.   conduct of this action
  3532.   \schedule\par}
  3533.  
  3534. \def\summonstext{%
  3535.   {\scaps Let all parties} concerned attend before Master \blank
  3536.   at the Chambers of the Judge, Room No.~\phantom{100}, Royal
  3537.   Courts of Justice, Strand, London WC2A 2LL, on
  3538.   \phantom{Wednesday} the \nodate\ at \phantom{12}~o'clock in
  3539.   the \phantom{after}noon on the hearing of an application on
  3540.   the part of the \plaintfs\ for the following
  3541.   relief---\par\nobreak\medskip} 
  3542.  
  3543. \def\ostext{%
  3544.   TO\ignorespaces\getdefs
  3545.   \smallskip
  3546.   {\scaps Let The \expandafter{\dfdants}}\ within [14] days after 
  3547.   service of this summons on \them\ \respectively, counting the day 
  3548.   of service, return the accompanying Acknowledgment of Service 
  3549.   to the appropriate Court Office
  3550.   \smallskip
  3551.   {\scaps By This Summons}, which is issued on the application of the
  3552.   \plaintfs\unskip\space\getpls\unskip\space the \plaintfs\ \seek\ the 
  3553.   following relief, that is to say---\hfil\par}
  3554.  
  3555. \def\endostext{%
  3556.   If the \dfdants\ \do\ not acknowledge service, such judgment may 
  3557.   be given or order made against or in relation to \them\ as the 
  3558.   Court may think just and expedient
  3559.   \medskip
  3560.   Dated the \nodate
  3561.   \medskip
  3562.   {\bf Note}---This summons may not be served later than 4~calendar 
  3563.   months beginning with the above date unless renewed by order of 
  3564.   the Court.
  3565.   \medskip
  3566.   This summons was taken out by \ignorespaces\sols \solicitors\ 
  3567.   for the said \plaintfs\ whose \addressis\ as stated above
  3568.   \medskip
  3569.   \centerline{\bf IMPORTANT}\par\nobreak
  3570.   Directions for Acknowledgment of Service are given with the 
  3571.   accompanying form.\par
  3572.   }
  3573.  
  3574. \def\subjectmatter#1#2{%#1=matter,#2=text
  3575.   \global\advance\mattercount by1
  3576.   \rightappenditem{\scaps#1 \rm of} #2\to\matters}
  3577.  
  3578. \def\matter#1{\subjectmatter{In the Matter}{#1}}
  3579. \def\estate#1{\subjectmatter{In the Estate}{#1}}
  3580.  
  3581. \def\re#1{\nopartiestrue\def\res{\vbox{\hsize=2.8in
  3582.   \centertext{#1}}}}
  3583.  
  3584. % Set up the parties
  3585.  
  3586. \def\forwhom{\pltext\dftext%\unskip
  3587.   \ifclientpl\plaintfs\else\dfdants\fi}
  3588.  
  3589. \def\notforwhom{\pltext\dftext%\unskip
  3590.   \ifclientpl\dfdants\else\plaintfs\fi}
  3591.  
  3592. \newcount\ct % courts
  3593. \def\court{\ifcase\ct IN THE HIGH COURT OF JUSTICE
  3594.   \or IN THE \courtname\ COUNTY COURT
  3595.   \or IN THE COURT OF APPEAL
  3596.   \or IN THE HOUSE OF LORDS
  3597.   \else IN THE HIGH COURT OF JUSTICE
  3598.   \fi}
  3599.  
  3600. \def\highcourt{\ct=0}
  3601.  
  3602. \def\countycourt{%\ct=1 \div=0 \dref=0
  3603.   \morecountycourtdefaults\countycourtstuff\getcourtname}
  3604.  
  3605. \def\getcourtname{% adapted from \setupccrefs below
  3606.  \begingroup\obeylines
  3607.  \aftergroup\getnameofcase\casereferences}
  3608.  
  3609. \def\getnameofcase{%
  3610.  \def\dateref{}%
  3611.  \def\caseref{}%
  3612.  \def\courtname{\argument1}%
  3613.  }
  3614.  
  3615.  
  3616. \def\courtofappeal{\ct=2\def\appealtext{\courtofappealtrue}}
  3617. \def\houseoflords{\ct=3}
  3618.  
  3619. \newcount\div
  3620. \newcount\dref
  3621.  
  3622. \def\chancery{\div=1 \dref=1
  3623.   \def\divref{CH\ }
  3624.   \def\issuer{Chancery Chambers}
  3625.   \def\chambers{Master
  3626.   \if\mast\empty \blank
  3627.     \else\mast\ \fi in Chancery
  3628.   Chambers, Room No.\noday, }}
  3629.  
  3630. \def\queensbench{\div=2 \dref=2
  3631.   \def\divref{QB\ }
  3632.   \def\issuer{Central Office}
  3633.     \def\chambers{the Master in Chambers in Room No.\noday, 
  3634.   Central Office, }}
  3635.  
  3636. \def\familydivision{\div=3 \dref=3
  3637.   \def\divref{No.\ }
  3638.   \def\issuer{The Principal [{\it or\/} 
  3639.   \blank District Probate] Registry}
  3640.     \def\chambers{}}
  3641.  
  3642. \newcount\subdiv
  3643. \def\subdivision{\ifcase\subdiv 
  3644.   \or Companies Court
  3645.   \or Commercial Court
  3646.   \or Official Referee's Court
  3647.   \or The Principal [{\it or\/} \blank District Probate] 
  3648.     Registry
  3649.   \fi}
  3650. \def\companiescourt{\subdiv=1}
  3651. \def\commercialcourt{\subdiv=2}
  3652. \def\OR{\subdiv=3}
  3653. \def\probateregistry{\subdiv=4}
  3654.  
  3655. \def\mrjustice{}
  3656. \def\judge#1{\def\mrjustice{#1}}
  3657. \def\judgename{\if\mrjustice\empty\else Mr Justice \mrjustice\fi}
  3658.  
  3659. \def\mast{}
  3660. \def\master#1{\def\mast{#1}}
  3661. \def\mastername{\if\mast\empty\else Master \mast\fi}
  3662.  
  3663. \def\divref{\ifcase\dref 
  3664.   \or CH\
  3665.   \or QB\
  3666.   \or Fam.\
  3667.   \fi}
  3668.  
  3669. \def\dateref{\ifcountycourt\else\number\year\fi}
  3670. \def\caseref{\ifcountycourt\else --\phantom{A}--\fi}
  3671. \def\casenumber{No.~\phantom{1234}}
  3672. \def\issued{}
  3673. \def\writissued{}
  3674. \def\issued#1 #2 #3 {\def\writissued{%
  3675.   Writ issued the #1 day of #2 #3}}
  3676.  
  3677. \def\no#1 {\def\casenumber{No.\ #1}
  3678.   \def\dateref{}
  3679.   \def\caseref{}}
  3680.  
  3681. \def\reference{\divref\dateref\caseref\casenumber}
  3682.  
  3683. % Can't remember what these did...
  3684. %\def\sref#1{\def\sref{#1}}
  3685. %\def\cref#1{\creftrue\def\cref{#1}}
  3686.  
  3687. \def\attention#1{\def\attentionof{#1}}
  3688. \attention{}
  3689. \long\def\comment#1{\def\faxtext{\if#1\empty
  3690.  \else\medskip#1\fi}}
  3691. \comment{}
  3692.  
  3693. \def\backsheet{\enddoc\bsdft}% default
  3694. \let\beginos\os
  3695.  
  3696. % Here are all the default parameters set by LeXTeX---
  3697.  
  3698. \greektrue % Used in \sssscl
  3699. \cardtrue % Used in \ssssscl
  3700. \clindtrue % hanging indentation in clauses
  3701. \nocommaindatefalse % Comma in the date
  3702. \qfalse %  No quotes in quotations
  3703.  
  3704. \footindent=10pt % Indentation of footnotes
  3705. \clindent=23pt % Indentation of clauses
  3706. \sclindent=46pt % Indentation of sub-clauses
  3707. \ssclindent=69pt % Indentation of sub-sub-clauses
  3708. \sssclindent=92pt % Indentation of sub-sub-sub-clauses
  3709. \ssssclindent=115pt % Etc
  3710. \sssssclindent=138pt % Etc
  3711. \cnindent=65pt % indentation of "computer-numbered" clauses
  3712.  
  3713. \hclindent=0pt % Indentation of clauses if clindfalse
  3714. \hsclindent=\clindent % Ditto of sub-clauses
  3715. \hssclindent=\sclindent % Etc
  3716. \hsssclindent=\ssclindent
  3717. \hssssclindent=\sssclindent
  3718. \hsssssclindent=\ssssclindent
  3719.  
  3720. \parindent=20pt % indentation of paragraphs
  3721. \quoteindent=20pt % indentation of quotations
  3722. \quoteparindent=20pt % \parindent in a quotation
  3723. \rbracketsize=2.85in % The width of the \vbox used for \ssd etc
  3724. \lbracketsize=2.225in % The width of a left bracket \vbox
  3725. \brackdepth=.5in % The space left under "in the presence of---"
  3726. \hfuzz=1.5pt
  3727. \hsize=5.35in
  3728. \vsize=8.5in
  3729. \hoffset0.5in
  3730. \voffset.5in
  3731. \parskip=3pt plus .75pt minus .75pt
  3732. \def\footnoterule{}
  3733.  
  3734. \quoteparskip=1.5pt plus 1pt % The amount of \parskip in quotes
  3735. \blankskip=10pt plus20pt minus 0pt % Used in \noaddr etc
  3736. \signindent=3.5in % Indentation of signature 
  3737.  
  3738. \settledgap=1in plus.3fill minus.5in % v. space Settled, \inn
  3739. \clskip=\medskipamount % amount of skip before a clause
  3740. \sclskip=\smallskipamount % amount of skip before a \scl
  3741. \ssclskip=0pt plus1pt minus0pt % amount of skip before a \sscl
  3742. \sssclskip=0pt plus.5pt minus0pt % ditto before a \ssscl
  3743.  
  3744. \twelvebase=18pt % \normalbaselines in \twelvepoint
  3745. \tenbase=15pt    % \normalbaselines in \tenpoint
  3746. \ninebase=11pt   % \normalbaselines in \ninepoint
  3747.  
  3748. \twelvesmallskipamount=4.5pt plus1pt minus1pt
  3749. \twelvemedskipamount=9pt plus2pt minus2pt
  3750. \twelvebigskipamount=18pt plus4pt minus4pt
  3751. % The next three are set by PLAIN
  3752. %\tensmallskipamount=3pt plus1pt minus1pt
  3753. %\tenmedskipamount=6pt plus2pt minus 1pt
  3754. %\tenbigskipamount=12pt plus4pt minus4pt
  3755. \ninesmallskipamount=2pt plus.5pt minus.5pt
  3756. \ninemedskipamount=4pt plus1pt minus 1pt
  3757. \ninebigskipamount=8pt plus2pt minus 2pt
  3758.  
  3759. % The next three are used by xref/contents macros
  3760. \notespace=0.2in % space marginal notes--text
  3761. \maxnote=1.0in % width of note
  3762. \clnamelength=0pt % Default width in table of contents
  3763. \pagewidth=\hsize % used by the index macros
  3764. \pageheight=\vsize 
  3765.  
  3766. \def\against{and} % the "and" between parties in pleadings
  3767.  
  3768. \tolerance=750
  3769.  
  3770. \def\engrossment{%
  3771.  \draftfalse
  3772.  \def\csettled##1{}
  3773.  \def\cresettled##1{}}
  3774.  
  3775. \def\setexno#1{\def\clearexno{\exno=#1 \front=#1}\clearexno}
  3776.  
  3777. \countdef\totaldocuments=1 \totaldocuments=0
  3778. \countdef\totalpages=2 \totalpages=1
  3779.  
  3780. \def\advancepageno{\ifnum\pageno<\z@ \global\advance\pageno\m@ne
  3781.   \else\global\advance\pageno\@ne\fi
  3782.   \global\advance\totalpages\@ne}
  3783.   \output{\plainoutput}
  3784.  
  3785. \def\plainoutput{\ifnum\pageno=1 \global\advance\totaldocuments\@ne\fi
  3786.   \message{Shipping out page}
  3787.   \shipout\vbox{\makeheadline\pagebody\makefootline}%
  3788.   \inform{(\ifnum\pageno=0 Unnumbered page\else Page \the\pageno\fi
  3789.     \space of Document \the\totaldocuments, 
  3790.     Total of \the\totalpages\space\ifnum\totalpages=1 page\else pages\fi\space so far)}%  
  3791.   \inform{}%
  3792.   \advancepageno
  3793.   \ifnum\outputpenalty>-\@MM \else\dosupereject\fi}
  3794.  
  3795. \let\backmatter=\empty
  3796. \let\signoff=\empty
  3797.  
  3798. \def\bstitle#1{%
  3799.  \getbstitlewidth
  3800.  \def\title{\setbox0\hbox{#1}
  3801.   \ifdim\wd0<\bstitlewidth\copy0
  3802.    \else\vtop{\hsize=\bstitlewidth\centertext{#1}}\fi
  3803.  }} % used for backsheets
  3804.  
  3805. \newdimen\maxpartywidth 
  3806.  
  3807. % These slightly complicated macros were derived from some suggestions made
  3808. % by Amy Hendrickson in TUGboat Vol 11, No 3, p359.
  3809. % \default defines eg \argument1 to be parameter 2.
  3810. % Unfortunately it would not be possible to call \argument1 directly.
  3811. % It would be necessary to use \csname argument1\endcsname[parameter 2]
  3812. % The macro \argument gets round this difficulty; \argument{1} (or \argument1
  3813. % if there is only one token to be used) converts to \argument1 (all one word).
  3814. % So \argument12 converts to \argument1{2}. Clear?
  3815.           
  3816. \def\default#1#2{\expandafter\def\csname argument#1\endcsname{#2}}
  3817. \def\argument#1{\csname argument#1\endcsname}
  3818.  
  3819. \def\highcourtdefaults{%
  3820.  \resetpleadingdefaults
  3821.  \ct=0% I think this should be elsewhere
  3822.  \default1{\number\year}
  3823.  \default2{\phantom{W}}
  3824.  \default3{\phantom{4321}}
  3825.  \def\divref{CH~}
  3826.  }
  3827.  
  3828. % get rid of old defs
  3829. \def\dateref{}
  3830. \def\caseref{}
  3831. \def\casenumber{}
  3832.  
  3833. \def\probatedefaults{%
  3834.  \resetpleadingdefaults
  3835.  \default1{}
  3836.  \default2{}
  3837.  \default3{}
  3838.  \def\divref{File No.~}
  3839.  \def\sparties{}}
  3840.  
  3841. \def\countycourtdefaults{%
  3842.  \resetpleadingdefaults
  3843.  \default1{\phantom{1234}}
  3844.  \def\divref{}
  3845.  }
  3846.  
  3847. \def\morecountycourtdefaults{%
  3848.  \resetpleadingdefaults
  3849.  \default1{\phantom{BORCHESTER}}
  3850.  \def\divref{}
  3851.  }
  3852.  
  3853. \def\division{\ifcase\div% \blank Division
  3854.   \or Chancery Division%            1
  3855.   \or Queen's Bench Division%       2
  3856.   \or Family Division%              3
  3857.   \or\or\or\or\or\or\or%           10
  3858.   \or Chancery Division (Probate)% 11
  3859.   \else \blank Division
  3860.   \fi}
  3861.  
  3862. \def\chanceryp{\div=11 \dref=1
  3863.   \def\divref{CH\ }
  3864.   \def\issuer{Chancery Chambers}
  3865.   \def\chambers{Master
  3866.   \if\mast\empty \blank
  3867.     \else\mast\ \fi in Chancery
  3868.   Chambers, Room No.\noday, }}
  3869.  
  3870. \def\countycourtstuff{%
  3871.  \ct=1 \div=0 \dref=0
  3872.  \countycourttrue
  3873.  }%
  3874.  
  3875. \gdef\ch{%
  3876.   \pleadingtrue\highcourtdefaults
  3877.   \chancery\setuphcrefs}
  3878. \gdef\qb{%
  3879.   \pleadingtrue\highcourtdefaults
  3880.   \queensbench\setuphcrefs}
  3881. \gdef\family{%
  3882.   \pleadingtrue\highcourtdefaults
  3883.   \familydivision\setupfamrefs}
  3884. \gdef\case{%
  3885.   \pleadingtrue\countycourtdefaults
  3886.   \countycourtstuff\setupccrefs}
  3887. \gdef\chp{%
  3888.   \pleadingtrue\highcourtdefaults
  3889.   \chanceryp\setuphcrefs}
  3890. \def\probate{%
  3891.   \pleadingtrue\probatedefaults
  3892.   \familydivision\begingroup}
  3893.  
  3894. \def\setuphcrefs{% The \endgroup is given by \lookatarg
  3895.  \begingroup\obeylines
  3896.  \aftergroup\setuphighcourt\casereferences}
  3897.  
  3898. \def\setupfamrefs{% The \endgroup is given by \lookatarg
  3899.  \begingroup\obeylines
  3900.  \aftergroup\setupfamcourt\casereferences}
  3901.  
  3902. \def\setupccrefs{%
  3903. % \countycourtdefaults
  3904.  \begingroup\obeylines
  3905.  \aftergroup\setupcountycourt\casereferences}
  3906.  
  3907. \def\setuphighcourt{%
  3908.  \def\dateref{\argument1}%
  3909.  \def\caseref{---\argument2---}%
  3910.  \def\casenumber{No.~\argument3}%
  3911.  }
  3912.  
  3913. \def\setupfamcourt{%
  3914.  \def\dateref{\argument1}%
  3915.  \def\caseref{ of~\argument2}%
  3916.  \def\casenumber{}%
  3917.  }
  3918.  
  3919. \def\setupcountycourt{%
  3920.  \def\dateref{}%
  3921.  \def\caseref{}%
  3922.  \def\casenumber{Case No.~\argument1}%
  3923.  }
  3924.  
  3925. % Note: Do not concatenate the next two lines
  3926. % The end of line is the delimiter of #1 of \casereferences.
  3927. % roger is the delimiter of #1 of \lookatarg. See Amy Hendrickson's
  3928. % Article in TUGboat for an explanation.
  3929.  
  3930. {\obeylines\gdef\casereferences#1
  3931. {\expandafter\lookatarg#1 roger }}
  3932.  
  3933. \newcount\argcount \argcount=0
  3934. \def\endofargs{roger}
  3935.  
  3936. \def\lookatarg#1 {\def\thisarg{#1}
  3937.   \ifx\thisarg\empty \let\go\lookatarg\else
  3938.   \ifx\thisarg\endofargs\let\go\endgroup
  3939.   \else\unskip\advance\argcount by1
  3940.    \expandafter\xdef\csname argument\the\argcount\endcsname{\thisarg} 
  3941.   \let\go=\lookatarg
  3942.   \fi\fi
  3943.   \go}
  3944.  
  3945. \def\registry#1{%
  3946.   \gdef\regis{#1 Registry}}
  3947. \let\regis\empty
  3948.  
  3949.  
  3950. % Move the next def
  3951. \def\appealcourt{\def\apcourt{ON APPEAL FROM
  3952.                   \headingskip
  3953.                   \courtappealled}}
  3954. \let\apcourt\empty 
  3955.  
  3956. \newdimen\bstitlewidth 
  3957. \def\getbstitlewidth{\iffullsize\bstitlewidth=\hsize
  3958.  \else\bstitlewidth=.5\hsize\fi}
  3959.  
  3960. % add to counter too many backsheet in multiple affys
  3961. \newif\ifended
  3962.  
  3963. \def\datesworn#1{\def\whensworn{#1}}
  3964. \datesworn{~~/~~/\number\year}
  3965.  
  3966. \def\origprocess#1#2#3#4#5{%#1=text for \draft, #2=intro text,
  3967. % #3=heading of document, #4=signature (if used), #5=end text
  3968.   \enddoc
  3969.   \storeparindent=\the\parindent
  3970.   \global\parindent=0pt
  3971.   \draft{#1}
  3972.   \pleadingtrue
  3973.   \gettitle
  3974.   \heading
  3975.   \parties
  3976.   \def\endofpleading{#4\bottomofpleading{#5}}
  3977.   \ifdraft
  3978.    \def\signoff{\endofpleading\settled} % see \chit
  3979.   \else\let\signoff\endofpleading\fi
  3980.   \medbreak
  3981.   \leavevmode
  3982.   #2\par
  3983.   \centertext{#3}
  3984.   \nobreak
  3985.   \amendnote}
  3986.  
  3987. \gdef\os{%
  3988.   \origprocess{ORIGINATING SUMMONS}%
  3989.     {\ostext}{}{}{\endostext}}
  3990.   
  3991. \def\osinheritance{%
  3992.   \origprocess{ORIGINATING SUMMONS}%
  3993.     {\osinhtext}{}{}{\endosinhtext}}
  3994.  
  3995. \def\specialwrit{%
  3996.    \clientpltrue
  3997.    \origprocess{WRIT OF SUMMONS\break(SPECIALLY ENDORSED)}%
  3998.     {\writtext}{STATEMENT OF CLAIM}{\signature}{\endwrittext}}
  3999.  
  4000. \def\generalwrit{% No Statement of Claim
  4001.    \origprocess{WRIT OF SUMMONS\break(GENERALLY ENDORSED)}%
  4002.     {\writtext}{}{\signature}{\endwrittext}}
  4003.  
  4004. \def\writ{\specialwrit}
  4005.  
  4006. \def\pageparameters{
  4007.   \def\footnoterule{}
  4008.   \parindent=10pt
  4009.   \quoteindent=20pt
  4010.   \quoteparindent=10pt
  4011.   \twelvepoint
  4012. }
  4013.  
  4014. % These should be redefined in RHlocal
  4015. \def\myaddress{\ouraddress}
  4016. \def\ouraddress{}
  4017.  
  4018. \newif\iffax
  4019. \def\faxsheet{\faxtrue}
  4020.  
  4021. \def\printfaxsheet{%
  4022.   \amendtextfalse
  4023.   \gdef\doctype{Sent by Fax}
  4024.   \inform{\doctype}
  4025.   \draftparameters
  4026.   \draftfalse
  4027.   \getworkdone
  4028.   \let\backmatter\empty
  4029.   \let\signoff\empty
  4030.   \clindfalse
  4031. %  \begingroup
  4032.    \pageno=1
  4033.    \nopagenumbers
  4034.    \parindent=0pt
  4035.    \centerline{\caps Fax from \counselname}
  4036.    \centerline{\vtop{\baselineskip=13pt\halign{\hfil##\hfil\cr
  4037.       \myaddress\crcr}}\strut}
  4038.    \bigskip
  4039.    \leftline{\vtop{\tenpoint\halign{##\hfil\cr
  4040.       \today\cr
  4041.       \noalign{\medskip}
  4042.       Solicitors' Reference---\sref\cr
  4043.       Counsel's Reference---\cref\cr
  4044.       \if\attentionof\empty\else
  4045.        \noalign{\medskip}
  4046.        For the Attention of \attentionof\cr
  4047.       \fi
  4048.      }\strut}}
  4049.    \bigskip
  4050.    \ifpleading\def\title{\chittitle\hfil}\fi
  4051.    \centerline{\vtop{\halign{\hfil##\hfil\cr\title\crcr}}}
  4052.    \vfil
  4053.    \centerline{\caps This Fax Consists of \the\count1\ Pages}
  4054.      \centerline{\caps (including this page)}
  4055.    \faxtext
  4056.    \vfil
  4057.    \def\addressfile{solicitors}
  4058.     \getaddress
  4059.     \leftline{\vtop{\baselineskip=13pt
  4060.                    \halign{##\hfil\cr
  4061.                      \sols\crcr}
  4062.                    \strut}}
  4063.    \supereject
  4064.  %  \endgroup
  4065.    \faxfalse}
  4066.  
  4067. \font\eightsl=cmsl8
  4068. \font\eightit=cmti8
  4069.  
  4070. \def\ca{% \def\v has been moved since it caused spacing problems
  4071. \begingroup\it\frenchspacing % This deals with, eg. Ltd. and v.
  4072. }
  4073.  
  4074. \def\v{\unskip\/\ {\rm v}\maybespace}% taken out of \ca
  4075. \def\se{\unskip\/\endgroup\maybespace}% mod aftergroup
  4076.  
  4077. \def\signed{%
  4078.  \inform{signature}%
  4079.  \par\nobreak
  4080.  \vskip1in plus 1fill
  4081.  \hbox{\hskip\signindent\vtop{%
  4082.   \parindent0pt
  4083.   \inn
  4084.   \hbox{\today}}}%
  4085.   \vskip 1in plus 2fill minus1in}
  4086.  
  4087. \def\jsigned{%
  4088.  \inform{signatures}%
  4089.  \par\nobreak
  4090.  \vskip1in plus 2fill
  4091.  \hbox{\hskip\signindent\vtop{%
  4092.   \parindent0pt
  4093.   \inn
  4094.   \hbox{\today}}}%
  4095.   \vskip 1in plus 1fill minus1in}
  4096.  
  4097. \def\copysigned{%
  4098.  \par\nobreak
  4099.  \vskip.75in plus 1fill
  4100.  \hbox{\hskip\signindent\vtop{%
  4101.   \parindent0pt
  4102.   \hbox{\counselname}
  4103.   \hbox{\inn}
  4104.   \hbox{\today}}}%
  4105.   \vskip 1in plus 2fill minus1in}
  4106.  
  4107. % These are defined twice! One should go...
  4108. \def\csettled#1{%
  4109.  \par\nobreak
  4110.  \vskip1in plus 1fill
  4111.  \hbox{\hskip\signindent\vtop{%
  4112.   \advance\hsize by-\signindent
  4113.   \parindent0pt
  4114.   \raggedright\tolerance=1000
  4115.   Settled, \ignorespaces#1
  4116.   \vskip\settledgap
  4117.   \inn
  4118.   \hbox{\today}}}%
  4119.   \vskip 1in plus 2fill minus1in}
  4120.  
  4121. \def\cresettled#1{% Note the \par
  4122.  \par\nobreak
  4123.  \vskip1in plus 1fill
  4124.  \hbox{\hskip\signindent\vtop{%
  4125.   \advance\hsize by-\signindent
  4126.   \parindent0pt
  4127.   \raggedright\tolerance=1000
  4128.   Re-Settled, \ignorespaces#1
  4129.   \vskip\settledgap
  4130.   \inn
  4131.   \hbox{\today}}}%
  4132.  \vskip 1in plus 2fill minus1in}
  4133.  
  4134. \def\silenthyphen{\space}
  4135.  
  4136. \def\footnotemark{% One bracket deleted.
  4137.  \let\@sf\empty\relaxnext@\ifhmode\edef
  4138.  \@sf{\spacefactor\the\spacefactor}\/\fi
  4139.  \def\next@{\ifx[\next\let\next\nextii@\else
  4140.   \ifx"\next\let\next\nextiii@\else
  4141.   \let\next\nextiv@\fi\fi\next}% bracket deleted.
  4142.  \def\nextii@[##1]{\footmarkform@{##1}\@sf}%
  4143.  \def\nextiii@"##1"{{##1}\@sf}%
  4144.  \def\nextiv@{{\scriptfont0=\sevenrm % scriptfont changed to 7pt
  4145.   \global\advance\footmarkcount@\@ne
  4146.   \footmarkform@{\number\footmarkcount@}\@sf}}%
  4147.  \futurelet\next\next@}
  4148. \catcode`\@=\other
  4149.  
  4150. \def\instructions{%
  4151.  \getbstitlewidth
  4152.  \begingroup
  4153.  \def\doctype{INSTRUCTIONS TO COUNSEL} 
  4154.  \capacitytrue
  4155.  \bsparams
  4156.  \ifpleading
  4157.    \else\xcenterline{\underbar{DATED\hskip2in \number\year}}\vfil\fi
  4158.  \xcenterline{\vtop{\openup2\jot
  4159.      \halign{\hfil##\hfil\cr
  4160.  \title\crcr}}}
  4161. \vfil
  4162.    \headerfont
  4163.    \xcenterline{%
  4164.     \setbox0\hbox{\doctype}%
  4165.     \ifdim\wd0<\bstitlewidth\copy0
  4166.      \else\vtop{\hsize=\bstitlewidth\centertext{\doctype\strut}}%
  4167.      \fi}
  4168.   \rm
  4169.   \medskip
  4170.   \xcenterline{\formalcounselname}%
  4171.   \vfil\vfil
  4172.    \getaddress
  4173.    \halign{\def\temp{##}\xcenterline{\upperc{\temp}}\inform{::\temp::}\cr
  4174.   \sols\crcr}%
  4175.    \smallskip
  4176.    \xcenterline{\eightrm Solicitors' Reference: \sref}
  4177.    \xcenterline{{\eightrm Counsel's Reference: \col/\cref}}
  4178.  \supereject
  4179.  \endgroup}
  4180.  
  4181. \def\writecontents{\inform{Opening contents file: }%
  4182.  \immediate\openout\cont=\contentswritefile}
  4183.  
  4184. \def\minutes{%
  4185.   \spleading{MINUTES OF ORDER}
  4186.    {\scaps This Application}, \etc\par
  4187.    {\scaps And Upon Hearing}, \etc\par
  4188.    {\scaps And Upon Reading}, \etc\par}
  4189.  
  4190. \vbadness=5000 % No messages about underfull pages
  4191. \delimitershortfall=1pt
  4192. \delimiterfactor=999
  4193.  
  4194. % amend topofpleading to have 3 params, 3 being party.
  4195. \def\dovcert{\sdcert{M}}
  4196. \def\giftcert{\sdcert{L}}
  4197.  
  4198. \def\capacityfont{}
  4199. \def\capacity#1{\ifcapacity ({\capacityfont #1\/})\else\unskip\fi}
  4200.  
  4201. \def\beginparticulars{%
  4202.  \par
  4203.  \vskip\clskip
  4204.  \begingroup
  4205.   \clno=0
  4206.   \centerline{PARTICULARS}
  4207.   \par\nobreak}
  4208.  
  4209. \def\endparticulars{%
  4210.   \endgroup}
  4211.  
  4212. \def\writtext{%
  4213.  {\scaps To The \expandafter\uppercase{\dfdants}}%
  4214.  \unskip\space\getdefs\smallskip
  4215.  {\caps This Writ of Summons} has been issued against you by
  4216.  the \plaintfs\ \getpls\unskip\ in respect of the claim
  4217.  hereinafter set out. 
  4218.  \medskip
  4219.  Within 14 days after the service of this Writ on you,
  4220.  counting the day of service, you must either satisfy the
  4221.  claim or return to the Court Office mentioned below the
  4222.  accompanying {\scaps Acknowledgment of Service} stating
  4223.  therein whether you intend to contest these proceedings.
  4224.  \medskip
  4225.  If you fail to satisfy the claim or to return the
  4226.  Acknowledgment without stating therein an intention to
  4227.  contest the proceedings, the \plaintfs\ may proceed with the
  4228.  action and judgment may be entered against you forthwith
  4229.  without further notice.
  4230.  \medskip
  4231.  Issued from the \issuer\ of the High Court this \nodate
  4232.  \bigskip
  4233.  {\bf Note}---This Writ may not be served later than 4 calendar
  4234.  months beginning with that date unless renewed by order of
  4235.  the Court.
  4236.  \bigskip
  4237.  \centerline{\bf IMPORTANT}
  4238.  \nobreak\medskip
  4239.  Directions for Acknowledgement of Service are given with the
  4240.  accompanying form.\par
  4241.  \bigskip 
  4242.  %\vfil\penalty-5000\vfilneg
  4243.  \baselineskip=18pt
  4244.  \nobreak\smallskip\nobreak} % End of \writtext
  4245.  
  4246. % set up defaults
  4247. \bstitle{}
  4248. \solsref{}
  4249. \colsref{}           % Omit Counsel's initials
  4250. \timetaken{}         % hours
  4251. \casetype{}
  4252. \value{}             % omit pound sign
  4253. \difficulty{}        % out of 10
  4254. \proposedfee{}       % omit pound sign
  4255. \legalaidno{}
  4256. \comments{}
  4257.  
  4258. \def\Writissued{}
  4259. \maxpartywidth=4.5in % set \maxp@rtywidth. 
  4260. \def\amendnote{}
  4261. \def\amend{}
  4262. % Set up default in case no division is given.
  4263. \ch
  4264.  
  4265. \pleadingfalse % And reset this
  4266. \resetpleadingdefaults
  4267. \reset
  4268. \input rhlocal
  4269. \catcode`@=12
  4270. \normalnumbering
  4271. \twelvepoint
  4272.  
  4273.